AddFit Method [AutoLinePlot, AutoHistogram]

The AddFit method adds a fit to a line/scatter, step plot, 3D ribbon step plot, polar line/scatter, 3D ribbon, 3D wall, histogram, or 3D histogram plot. Returns an AutoFitPlot object.

Syntax

object.AddFit( type, id )

 

Parameter Type Description
type Long required, grfFitTypes
id Variant optional, custom fit name

 

Remarks

To use a custom fit equation, use the type = grfCustomFit parameter name and set the id to the name of the custom fit you want to use. The AddCustomFitDefinition method adds a user-defined fit type to be used by AutoFitPlot objects. To edit the custom fit, call the AddFit method, then use the SetCustomEquation, SetCustomParameter, and/or SetCustomName methods.

 

Example 1

This example shows how to add a fit curve to a plot.

Plot.AddFit(grfPolynomialFit)

Example 2

This example shows how to add a defined custom fit curve to a plot.

'LineScatterPlot.AddFit(grfCustomFit, "CustomFit123")

 

Used by: AutoLinePlot object, AutoHistogram object