GraphLayer::UngroupPlots

Description

Ungroups dataplots.

Syntax

BOOL UngroupPlots( int nIndex = -1 )

Parameters

nIndex
the index of any dataplot inside the group. If <0, use the first group

Return

TRUE for success, otherwise FALSE.

Examples

EX1

//Draw two data plots, group them then ungroup them.
void    GraphLayer_UngroupPlots_ex1()
{
    Worksheet wks1;                    
    wks1.Create("origin");
    Dataset ds1(wks1,0);            
    Dataset ds2(wks1,1);
    ds1.Data(1,20,1);                
    ds2.Normal(20);
    
    Worksheet wks2;                    
    wks2.Create("origin");
    Dataset ds3(wks2,0);            
    Dataset ds4(wks2,1);
    ds3.Data(1,20,1);                
    ds4.Data(2,40,2);
    
    GraphPage gp;                    
    gp.Create("origin");
    GraphLayer gl(gp.GetName(), 0);    
    gl.AddPlot(wks1);            
    gl.AddPlot(wks2);
    
    gl.GroupPlots(0);
    gl.UngroupPlots();
}

Remark

See Also

header to Include

origin.h