Curve Fitting

Watch this video to see how curve fitting works in the graphing engine.

Get the Flash Player to see this player.

Curve Fitting Function

This section explains how to use the curve fitting function inside the ‘Graphing’ functions. Begin by bringing up a graph showing two different series that you want to graph against each other.  In this case level and flow form an AV meter have been selected for the ‘Last 7 Days’. 

  basic-scatter-plot-graph

Under ‘Plot Method’ change from a ‘Time Series’ to a ‘Scatter Plot’ and click on the ‘Plot Data’ button. 

scatter-plot-tool Â

You are given a scatter plot showing level and flow in this case. 

scatter-plot

To add a curve to this graph click on ‘Curve Fit’ on the top right corner of the screen. 

curve-fit-tool

Select ‘New Curve”.

new-curve

Then select which type of curve you would like to pick. You can chose between ‘Linear’, ‘Polynomial’, ‘Exponential’,  ‘Logrithmic’, ‘Power’ and you can also plot ‘Manning’ curves.  Start by doing a ‘Polynomial’.

polynomial-curve

Select the polynomial order.  In this case we will use the third degree. Chose ‘save’ and the information is stored for this curve fit.

3rd-degree-polynomial

If you want to plot the curve, select it and click on ‘OK’.

plotting-curve

You see the curve that best fits through the data using a third order polynomial shown on the graph.  At the bottom of the graph you can see the equation for the polynomial and the calculated R2.

best-fit-curve

If you want to try a different kind of curve simply click on ‘Curve Fit’ and define a new curve. 

starting-new-curve

For the next example we can plot a fourth degree polynomial and save it. 

4th-degree-polynomial-set-up

The information is now saved for the fourth degree polynomial. You can chose to turn it on as well.

Turning-on-4th-degree-polynomial

Although you can’t see the difference from a far, zooming in will show that there is in fact two curves.

two-curve-fit zoomed-in-two-curve-fits

You can turn on and off curves by checking or unchecking them in the curve fit box. 

turning-curves-on-and-off

If you want to add a manning curve, simply chose the ‘Manning’ function and enter in the pipe diameter, in this case 0.3 meters, the hydraulic slope which in this case is 0.04 and the manning coefficient you want to display.

creating-a-mannings-curve

Chose save and then chose to display this curve. 

selecting-mannings-curve

You will see the manning curve plotted through the data.  

mannings-curve

It is important to note that the manning curve is not a curve fit through the data.   It is simply the manning curve based on the coefficients that were entered.

With any curve, clicking on the curves shows the values under selected point.  This allows you to look up values by simply clicking on the curve at different locations and reading the value underneath the graph.

data-point-values

You can display a family of manning curves by simply going to ‘Curve Fit’ and selecting another new curve.  So in this case we will produce another manning curve with a manning coefficient of 0.015.

multiple-mannings-curves

Save it and then chose to display it.  This will display the second curve so you can show a series of curves on the graph.

multiple-mannings-curve-graph

Under curve fit, each curve type is shown along with the date range of data the curve was fit to and the x and y values that were used in the fit. This date range does not change. It you want to create another curve using different data, you have to create it using the ‘New Curve’.

saved-curve-date-ranges

To delete a curve simply select it and click on ‘delete’.

deleting-curves

If you have a question related to this article you can ask it below.

Leave a Reply