CPlotView:CountSeries


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

Syntax

nSeries = CPlotView:CountSeries()

bullet.gif    On success, this method returns nSeries > 0.

bullet.gif    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 = new_plotview()

-- create a CPlotView

V:Add( 25, 66.5)

-- add a point to the plot data

  ...

-- 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 plot data

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

CPlotView class, CountSeriesPoints


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