GraphPad Curve Fitting Guide

How to: Plot a function

How to: Plot a function

Previous topic Next topic No expanding text in this topic  

How to: Plot a function

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Prism offers a Plot a function analysis, but it doesn't in fact analyze any data. Rather it generates curves from an equation you choose and parameters you enter.

How to: Plot a function

1.Start from any data table or graph, click Analyze, open the Generate Curve folder, and then select Plot a function.

2.On the first tab (Function), choose the equation, the starting and ending values of X, and the number of curves you want to plot.

3.On the second tab (Options), choose whether you also want to plot the first derivative, second derivative or integral of the function.  The "curve" is actually a set of X and Y coordinates that define a series of points that are connected to form the curve. You can choose the number of line segments that will define the curve. There is little reason to change the default (150), unltess you want to plot only a portion of the curve on some graphs, in which case you should increase that value.

4.On the third tab (Parameter values), enter the parameter values (or click the fish hook icon to hook analysis or info constants).

Tips for plotting a function

Plotting a family of curves

If you choose to plot more than one curve (a choice on the first tab), the rest of the dialog works a bit differently.

On the bottom of the second (Options) tab, choose if you want to label each curve manually (enter the labels the top of the third tab) or using the value of one of the parameters.

The top of the third tab lists all the curves you will generate. Select one or more of these curves (or click "select all") and then enter the parameter values below. Often you'll want to first click "select all" and enter most of the parameters. Then click on one curve at a time, and enter the value for the parameter that varies between curves.

Plotting each curve on a separate graph

By default, Prism will make graph that contains all of the curves on one graph. If you want each curve to be on its on graph, go to the results table, click New and choose Graph of existing data. On the dialog that pops up, choose to make one graph for each data set (in this context, a data set is a curve).

If you plan to zoom in and plot only part of the curve

The curve is defined, by default, as 150 line segments. That creates a smooth looking curve. But if you then change the range of X values shown on the graph, only a fraction of those line segments will be visible, and the curve may seem coarse. To fix this problem, go back to the parameters dialog, to the Options tab, and increase the number of line segments to a much larger value.

Combining two curves on one graph

The graph below combines two plotted functions on one graph. The first time I plotted a function, I chose a Gaussian distribution, with the X ranging from -3 to 3. I set the mean to 0.0, the SD to 1.0, and the amplitude to 100.0 (arbitrary, since I hid that axis). I then repeated that analysis, but this time set the X range from 1.3 to 3.0. I put both curves on one graph (Change.. Add data sets -- remember that a curve generated by this analysis is a "data set" to Prism). For the shorter curve, I chose to create an area fill.