Previous documentTable of Contents


Plot Options

There are options that control the way the graphical output of a fit is displayed. This document discussed those options The options are:

The Plot Options are accessed from the Fit Results screen.


AxesLabel

By default, the axes of the plot is not labelled. The AxesLabel option allows you to label either or both of the axes. The relevant part of the Plot Options screen looks like this:

AxesLabel

Horizontal Axis (Independent Variable)
(default: None)


Vertical Axis (Independent Variable)
(default: None)

AxesLabel allows the user to specify labels for the axes of the data/fit results plot. If a label is specified for the horizontal axis, it will also be used to label the horizontal axis of the residual plot.

We choose to label both axes by changing the form to look like this:

AxesLabel

Horizontal Axis (Independent Variable)
(default: None)


Vertical Axis (Independent Variable)
(default: None)

AxesLabel allows the user to specify labels for the axes of the data/fit results plot. If a label is specified for the horizontal axis, it will also be used to label the horizontal axis of the residual plot.

Now the axes are labelled:

Axes labels

Extrapolate

By default, the curves representing the result of the fit only extend from the data point with the minimum value of the independent variable to the data point with the maximum value of the independent variable. Extrapolating beyond this range is sometimes dangerous and/or wrong. This is because it assumes that the model being used to fit the data extends to regions where there is not any data, and thus we have little or no information about what the data would look like in those regions..

The Extrapolate option allows you to extrapolate the plot to regions without any data. The part of the Plot Options screen controlling this behavior looks like this:

Extrapolate

  False (default)
 
   
Minimum:
Maximum:

By default, the data/fit results plot only displays the results of the fit within the range of the experimental data. If one is positive that the model being fit to is correct outside the range of the data, then extrapolation may be desired. The Extrapolate options allows the user to specify the minimum and maximum values of the independent variable to be displayed.

Here is the plot of the result of fitting temperature versus pressure in a constant volume gas thermometer to a straight line:

pressure vs temperature

The fitted value of the intercept of the line with the temperature axis is -263 ± 18 Celsius. This should be the value of absolute zero. The accepted value for absolute zero is -273.16 Celsius, and the experimental result is consistent with that value within errors. In this case it would be useful to see that intercept, which can be accomplished by extrapolating:

Extrapolate

  False (default)
 
   
Minimum:
Maximum:

By default, the data/fit results plot only displays the results of the fit within the range of the experimental data. If one is positive that the model being fit to is correct outside the range of the data, then extrapolation may be desired. The Extrapolate options allows the user to specify the minimum and maximum values of the independent variable to be displayed.

Now we can see the intercept on the plot:

extrpolated plot

ListPlotThreshold

When the data contain no explicit errors and there are many data points, the plot of the data is produced by the Mathematica build-in function ListPlot. The size of the "dots" produced by ListPlot can be fairly small, depending on the display device; sometimes these points are difficult to see. Thus, when there are only a few data points, the plot of the data is produced by an internal program from the Experimental Data Analyst package which uses a larger diamond shaped "dot." The ListPlotThreshold option sets how many data points are necessary for ListPlot to be used.

Here is a plot of a fit to a parabola of 14 data points relating to the growth of the retina in cats:

Data displayed with an internal program

We set the value of ListPlotThreshold to 13 by typing that number directly in the text field below:

ListPlotThreshold


(default: 100)

If the data do not have explicit errors, then the data points are represented either by small dots or by somewhat larger diamonds, depending on how many data points there are: if the number of data points is greater than the value of ListPlotThreshold then dots are used, and otherwise diamonds are used.

Repeat the fit produces the following plot, in which the data points are represented by smaller dots:


PlotLabel

This option allows the plot of the data and the fit results to have a label. For example, if we type into the text field below:

PlotLabel


(default: None)

When text is entered into the text field to the left, that text will be the label on the plot.

then the resulting plot is:

A labelled plot

PlotRange

By default, LinearFit chooses ranges for the vertical and horizontal axes of the fit results plot that include all or most of the data with appropriate scaling. The PlotRange option allows you to override this default behavior.

The relevant part of the Plot Options screen looks like this:

PlotRange

Horizontal Axis (Independent Variable)
Automatic (default)
Min:  Max: 
Vertical Axis (Dependent Variable)
Automatic (default)
Min:  Max: 
PlotRange allows the user to specify the minimum and maximum values for the horizontal and vertical axes of the data/fit results plot.

Here is a plot of a fit to a parabola of 14 data points relating to the growth of the retina in cats:

Data displayed with an internal program

The vertical axis does not extend to values of the dependent variable of zero. To force the range to include this, while leaving the scaling of the horizontal axis as is, we change the panel to look like:

PlotRange

Horizontal Axis (Independent Variable)
Automatic (default)
Min:  Max: 
Vertical Axis (Dependent Variable)
Automatic (default)
Min:  Max: 
PlotRange allows the user to specify the minimum and maximum values for the horizontal and vertical axes of the data/fit results plot.

Now the plot looks like this:

PlotRange option

ResidualPlacement

By default, LinearFit displays a plot of the residuals as a sub-graph of the main data/fit results plot. It attempts to place the residual plot in a quadrant of the graph where there is zero or a small amount of information; if it can find no such quadrant it will display the residual plot separately.

The relevant part of the Plot Options screen looks like this:

Residual Placement

- Automatic (default)
- Upper right quadrant
- Upper left quadrant
- Lower left quadrant
- Lower right quadrant
- Separate
- None

When ResidualPlacement is set to Automatic, the default, the program attempts to place the residual plot in the quadrant of the main data/fit results plot that has the smallest amount of information; if it can not find a quadrant with a sufficiently small amount of information, it will display the residual plot separate from the main data/fit results one.

This default behavior can be changed by choosing a quadrant, forcing a separate plot, or suppressing the residual plot.


UseFitErrors

By default, the main plot produced by LinearFit shows the data points, including the error bars if any, plus the results of the. The "best" fit result is displayed as a solid line, and the errors in the fit are used to calculate a range of possible fits whose boundaries are indicated on the plot as dashed lines.

Thus the default graph of a fit of some synthetic data by Pearson and York to a straight line looks like:

Pearson York data: default graph

The relevant part of the Plot Options screen will look like the following when the option is set to False:

UseFitErrors

- True (default)
- False

When UseFitErrors is set to True, its default, the effect of errors in the fit parameters is indicated by dashed lines in the graph of the fit results. When set to False no such lines are displayed.

The display of the fit is now:

UseFitErrors = False

The plot produced with options will, within those options, be identical to the original plot with possibly one small exception: the exception involves the dashed lines that display the range of fit values consistent with the errors in the fitted parameters. If there are more than two fit parameters, the original fit used the covariance matrix to decide which terms should be added and which are subtracted. The plot produced from the PlotOptions setup screen will calculate these ranges using a heuristic unless when the original fit was performed the covariance matrix was also returned. The differences between these two ways of doing the calculation are almost always either zero or trivial, and if Brent minimisation is used there is no covariance matrix so there are never any differences. Nonetheless, in the rare case when the differences are appreciable and important, you may set the ReturnCovariance option to True from the Advanced Options button on the Fit Setup screen. Further details on the calculation of the dashed lines may be found here.


Previous documentTable of Contents


This document is Copyright © 1999, 2000 David M. Harrison. The screens are Copyright © 1999, 2000 Solomon R.C. Douglas and David M. Harrison. This is version 1.9, data (m/d/y) 02/11/00.