curve_update

 

Description

find the input curve layer and plot the result curve

Syntax

bool curve_update( curvebase & cuvResult, const curvebase & cuvInput, const TreeNode & trInput, int nColor, bool bRescale = false )

Parameters

cuvResult
[input] Curve to plot
cuvInput
[input] reference Curve to find where to plot the cuvResult
trInput
[input] if given, this will provide the graph layer location to plot cuvResult
nColor
[input] color of the cuvResult curve
bRescale
[input] rescale layer or not

Return

TRUE if correct layer is found and cuvResult is plotted successfully

Examples

EX1

//This example shows how to plot the data of column C to the same graph layer as the data of column B in red.
//For this sample codes to run, current window must worksheet and have column B and C 
//in the current project and a Graph with the data of column B plotted exists too.
        
void curve_update_ex1()
{
   Worksheet wks = Project.ActiveLayer();
   if(wks)
   {
       Curve crvPlotted(wks, 1);
       Curve crvToBePlot(wks, 2);
       TreeNode trInput;
       int nColor = SYSCOLOR_RED; 
       if(crvPlotted && crvToBePlot)
       {
           curve_update(crvToBePlot, crvPlotted, trInput, nColor);
       }
   }
}

Remark

See Also

curve_update_in_page

header to Include

origin.h

Reference