Guide to fit curves in Grapher

Whether you're using predefined fit curves, creating custom fits, or fitting data subsets, this guide covers it all. Learn how to display and edit fit statistics, apply fits to class scatter plots, and export fit data to streamline and strengthen your analysis.

Once you have created a fit curve, you can edit any aspect of the fit by selecting it in the Object Manager, and then editing its parameters (such as the Fit type and Plot Interval) in the Property Manager. More details on editing fit curves can be found here: Grapher Fit Curves Training Video

 

Table of Contents

Apply a predefined fit curve to a line/scatter plot

Create a custom fit curve

Apply a fit to a data subset

Display the fit statistics

Edit the fit curve statistics display

Add a fit curve to a class variable in a class scatter plot

Export fit curve data to a data file

 

Apply a predefined fit curve to a line/scatter plot

  1. Click on the line/scatter plot in the Object Manager to select it.
  2. Click Graph Tools | Add to graph | Fit Curve and select the desired pre-defined fit.

Create a custom fit curve

  1. Select the line/scatter plot in the Object Manager.
  2. Click Graph Tools | Add to Graph |Custom Fit
    14_-_Grapher_Add_Custom_Fit_Menu_Button.png
  3. In the Add Custom Fit dialog, specify your custom fit equation and parameters, and click OK. For detailed information about custom fit parameters, see the Add Custom Fit page in the Grapher Help.12_-_Grapher_Add_Custom_Fit_Equation_Dialog.png
  4. To edit any aspect of the fit curve, select the Fit curve in the Object Manager and then edit the Fit equation and Parameters on the Plot tab of the Property Manager.
    Custom_Fit_Curve_Properties.png

Apply a fit to a data subset

  1. Click on the line/scatter plot in the Object Manager to select it.
  2. Click Graph Tools | Add to Graph | Fit Curve and select your desired fit type.
    18_-_Grapher_Graph_Tools_Add_Fit_Curve.png
  3. Click on the Fit object in the Object Manager to select it.
  4. In the Property Manager, click on the Plot tab.
  5. In the Fitted Plot section, uncheck the box next to Apply fit to entire plot.
    20_-_Grapher_Property_Manager_Plot_Tab_Apply_to_Fit.png
  6. Update the Minimum X plot value to fit (or Minimum X date/time if the values in the data file are formatted as date/time).
  7. Update the Maximum X plot value to fit (or Maximum X date/time if the values in the data file are formatted as date/time) with the x values for the data range you wish to use.

    For example, if you were to limit the equation to the area circled in red below, you would enter 40900 for Minimum X plot value to fit and 40945 for the Maximum X plot value to fit.
    Area_to_fit_the_curve.png

8. After changing the fit curve Fitted Plot properties, your fit curve will be reduced area within the circle.
         fit_applied_to_area_of_interest.png

 

Display the fit statistics 

  1. Click on the fit curve in the Object Manager to select it.
  2. In the Property Manager, click on the Plot tab.
  3. Expand the Statistics section, and select how you want the statistics to be displayed:
    1. Click Copy to copy the fit statistics to your clipboard. 
    2. Click Display if you wish to display the fit statistics in a Report window.
    3. Click Insert and then click on your plot document to insert the fit statistics into the plot document as a text object. 

Details about the fit statistics can be found on the Fit Statistics page in the Grapher Help.

Edit the fit curve statistics display

Fit curve statistics inserted into your plot can be edited in the Property Manager or the Text Editor. For example, to adjust the significant digits or decimal places displayed in your fit curve statistics.

  1. In the Object Manager, click the Fit object to select it.
  2. In the Property Manager, click the Plot tab.
  3. Set the Number format field to Compact or Fixed.
  4. Set the Significant digits or Decimal places to the desired number.

Linked statistics, inserted using the Insert into plot document command, will automatically update. You may also edit their font properties, and rearrange and/or remove them by first selecting the text box, then applying your desired changes in the Property Manager. You can also double click on the text box to open the Text Editor and customize your text.

Inserted_Linear_Fit_Statistics.png

 

Note that the significant digits adjustments will not update statistics in an open Report window, nor will it update any statistics pasted into a text object using the Copy to clipboard command.

  • To update your statistics report, close and reopen the report.
  • To update the statistics in a text object, delete the existing text object and create a new one.

Add a fit curve to a class variable in a class scatter plot

  1. In the Object Manager, select your class scatter plot.
  2. Click Graph | Add to Graph | Fit Curve.
  3. In the Object Manager, select the fit curve object you just added.
  4. In the Property Manager, click the Plot tab.
  5. In the Fitted Plot section, in the Class field, either choose a specific class to fit the curve to, or select (All).

Export fit curve data to a data file

The X,Y points of a fit curve can be exported by following the steps below.

  1. Click on the fit curve in the Object Manager.
  2. Click Graph Tools | Plot Tools | Export Data.
  3. Click OK in the Export Data dialog. 

    11_-_Grapher_Export_Fit_Curve_Data_Analysis.png

  4. The graph coordinates of the fit curve are added to a new worksheet.
  5. Click File | Save As to save the results to your desired data file format.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.