| 2.2.4.17.25 GraphLayer::GroupPlotsGroupPlots
 DescriptionGroups dataplots in layer.
 SyntaxBOOL GroupPlots( int nIndexStart, int nIndexEnd = -1 ) Parameters nIndexStart[input] the index of the first dataplot to be grouped nIndexEnd[input] the index of the last dataplot to be grouped. All the dataplots from nIndexStart to nIndexEnd are going to be put into the same group (if nIndexEnd is negative, all the dataplots from nIndexStart to the end are going to be grouped)
 ReturnTRUE for success, otherwise FALSE.
 ExamplesEX1
 //Draw two dataplot, group them and update the legend.
void    GraphLayer_GroupPlots_ex1()
{
    Worksheet wks1;                    
    wks1.Create("origin");
    Dataset ds1(wks1,0);            
    Dataset ds2(wks1,1);
    ds1.Data(1,20,1);                
    ds2.Normal(20);
    GraphPage gp;                    
    gp.Create("origin");
    GraphLayer gl(gp.GetName(), 0);    
    gl.AddPlot(wks1);
    
    Worksheet wks2;                    
    wks2.Create("origin");
    Dataset ds3(wks2,0);            
    Dataset ds4(wks2,1);
    ds3.Data(1,20,1);                
    ds4.Data(2,40,2);
    gl.AddPlot(wks2);
    
    gl.GroupPlots(0);
    legend_update(gl, ALM_CUSTOM, true, true, "@D");
    gp.SetShow();
}RemarkSee AlsoHeader to Includeorigin.h
 |