CPlotView:CountSeries


The Count method returns the number of plot series in the CPlotView window.

Syntax

nSeries = CPlotView:CountSeries()

    On success, this method returns nSeries > 0.

    On failure, this method returns 0.

Example

The following script plots some points in a CPlotView. It then returns the number of plots series in the plot window:

 

V = CPlotView:new()

-- create a CPlotView

V:Add( 25, 66.5)

-- add a point to the data array

  --

-- add 99 more points

V:PlotPoints()

-- plot 100 points in a new plot window

V:Empty()

-- empty all the points

V:Add( 20, 51.4)

-- add 1 point to the data array

V:AddSeries()

-- plot the point as a new series

n = CountSeries()

-- count the number of series

Printf( "n = %d", n)

-- result: n = 2

Related Topics

CountSeriesPoints

CPlotView class