Skip to main content
RSS feed Subscribe to feed

 

Fitting Model: Adding a Straight Line Fit

This example adds a straight line fit to a scatter plot.

public void AddStraightLineFitToScatterPlot(ScatterPlot plot)
{
    // Create a typed fitting model
    StraightLineFittingModel straightLineFit = 
        plot.FittingModels.AddNew<StraightLineFittingModel>();

    // Create from the type identifier
    FittingModel fittingModel = 
        plot. FittingModels.AddNew(FittingModelTypeIdentifiers.StraightLineFitModel);
}