2.2.4.17.31 GraphLayer::RemovePlot

Description

Removes one DataPlot from layer. The object is referred to by index.


Removes one DataPlot from layer. The object is referred to by refercence.

Syntax

BOOL RemovePlot( int nIndex, DWORD dwCntrl = 0 )


BOOL RemovePlot( DataPlot & dp, DWORD dwCntrl = 0 )

Parameters

nIndex
the DataPlot index


dp
[input] the DataPlot reference
dwCntrl
[ input ] can be REMOVEPLOT_REMOVE_RELATED_LABEL, REMOVEPLOT_REMOVE_RELATED_XERRBAR or REMOVEPLOT_REMOVE_RELATED_ERRBAR, you can mix them to control if remove related objects too;

Return

TRUE for success, otherwise FALSE


TRUE for success, otherwise FALSE

Examples

EX1

// the following code remove all data plots in the active layer
void GraphLayer_RemovePlot_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    
    int nPlots = gl.DataPlots.Count();
    
    for(int ii = 0; ii < nPlots; ii++)
        gl.RemovePlot(0);
}

Remark

See Also

Header to Include

origin.h