CPlotView:GetErrY CPlotView:PlotPoints

CPlotView:Remove


The Remove method deletes a data point from the class data matrix. This does not remove a point from the plot window.

Syntax

bSuccess = CPlotView:Remove( index )

    index is the array index of the point to remove. See Remarks.

    bSuccess is returned true if the point is successfully removed.

    On failure, this method returns false.

Remarks

The point was added at an index that is any integer number. This method takes the index at which the point was added, and not its sequential index in the class data matrix. The index to use is the value returned by the Add method or the Find method.

Example

The following script fragment adds 100 points to a CPlotView using particular insertion indices:

 

V = CPlotView:new()

-- create a CPlotView

V:Add( 25, 66.5)

-- add a point to the data array

j = V:Add( 15, 22.3)

-- save index of the added point

V:Add( 31, 94.5, 1.62)

-- add a point with y errorbar

V:Add( 44, 100.5, 1.5, 2.22)

-- add a point with x,y errorbars

V:Remove(j)

-- remove the point

Printf("removed index %d", j)

-- result: removed index 2

Related Topics

CPlotView, Add