2.1.5.8 curve_update_in_page


Description

It searches for the dataplot containing the given curve. If found, just refreshes the graph page, otherwise it adds the curve to the first layer of the page.

Syntax

bool curve_update_in_page( curvebase & cuv, int nColor, GraphPage & gpg, bool bRescale = false )

Parameters

cuv
[input] the input curve
nColor
[input] nthe color the curve should have.
gpg
[input] the graph page in which to look for the curve.
bRescale
[input] to rescale the layer with the curve or not.

Return

TRUE if OK, otherwise FALSE.

Examples

EX1

//This example add curve with the data of column B of first worksheet's to a Graph.
void curve_update_in_page_ex1()
{
    WorksheetPage wksPage = Project.WorksheetPages(0);
    Worksheet wks = wksPage.Layers(0);
    if(wks)
    {
        Curve crvPlotted( wks, 1 );
        GraphPage gp1;
        gp1.Create("origin");
        int nColor = SYSCOLOR_BLACK;          
        if(gp1 && crvPlotted)
        {
            curve_update_in_page(crvPlotted, nColor, gp1);
        }
    }
}

Remark

See Also

curve_update

Header to Include

origin.h

Reference