CPlotView:PlotStepLine CPlotView:Scatter

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 )

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

bullet.gif    bSuccess is returned true if the point is successfully removed.

bullet.gif    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 adds 100 points to a CPlotView using particular insertion indices:

V = new_plotview()

-- create a CPlotView

V:Add( 25, 66.5)

-- add a point to the internal data matrix

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 class, Add


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.