It adds the curve cuv to the layer grl.
bool add_curve_to_graph_layer( curvebase & cuv, GraphLayer & grl, int nColor = 2, bool bRescale = false, int nPlotType = IDM_PLOT_LINE )
TRUE if OK, otherwise FALSE.
EX1
//This example add the data of the specified column to the first layer of the current Graph. void add_curve_to_graph_layer_ex1() { WorksheetPage wksPage = Project.WorksheetPages(0); Worksheet wks = wksPage.Layers(0); if(wks) { Curve crvPlotted( wks, 1 ); GraphPage gp; gp.Create("ORIGIN"); GraphLayer gl = gp.Layers(0); if(crvPlotted && gl) { int nColor = SYSCOLOR_BLUE; bool bRescale = true; int nPlotType = IDM_PLOT_SCATTER; bool bOK = add_curve_to_graph_layer(crvPlotted, gl, nColor, bRescale, nPlotType); string strGrp = gp.GetName(); string strCrv = crvPlotted.GetName(); if(bOK) { out_str(strCrv+" exists in "+strGrp); } else { out_str(strCrv+" does not exist in "+strGrp); } } } }
origin.h