DATA PLOTTING AND CURVE FITTING
In addition to algebraic equations, Graphmatica allows you to enter and plot data points. When you have finished entering your data, you can attempt to find the best fitting curve as well with a single click.
The Data Plot Editor provides basic tools to enter a set of coordinates to plot. To enter data in any cell in the grid, click on it and start typing to overwrite any data already in the cell, or double-click to position the cursor after the last character already in the cell. You can use backspace to correct mistaken entries.
You can also optionally use the other controls at the top of the pane to modify other aspects of the current data plot or switch to a different one.
Plot | Use this combo box to change the name of the current plot or switch to viewing the points for another plot in the grid control. You can create any number of data plots on the same grid, but you can only edit one plot at a time. |
New+ | Creates a new data plot. The plot is given the generic name "Data plot," which you can change immediately to something more descriptive. (Names can be up to 20 characters.) New plots also get the next symbol and color in the rotation, which you can also customize if desired. |
Del- | Deletes the current plot. |
Symbol | Allows you to choose between the different symbols (circles, squares, or diamonds) available |
Color | Allows you to choose a different color for the plotted points. |
Insert Point | Inserts a blank row in the grid at the cursor position |
Delete Point | Deletes the row (coordinate) at the cursor position |
Note that if you prefer, you may import a list of tab-delimited points from a text editor or spreadsheet using the Paste Data PlotPaste Data Plot operation.
When you have entered all of your points, you can fit the data to a smooth curve using the Curve Fit button. Graphmatica uses the Levenberg–Marquardt algorithm to fit the data to your choice of equation types (the default is polynomial). The resulting equation is graphed automatically, and annotated with the following values describing the results of the curve-fit:
r or R² | The correlation coefficient for the fit. The value is between 0 (no correlation) and 1 (a perfect fit). For a first-order polymonial fit (linear regression), Graphmatica displays r , the Pearson's correlation coefficient. For all other curves, the program shows R² , the
coefficient of determination.
Both values are relevant measures of "goodness of fit".
|
chi² | the sum of the squares of the differences between the curve and the actual y coordinates for all points. This is value the program actually tries to minimize to determine the best fit. |
iterations | the number of iterations it took to converge to that result. When this is equal to the maximum number of iterations specified in the Curve Fit Options, and continues to increase if you increase that number, the curve fit might not converge for the selected equation type. |
The Options button brings up the Curve Fit tab of the Settings dialog box, which allows you to adjust the parameters of the curve-fitting algorithm.