CPlotView:GetIndex
The GetIndex method returns the index of the current plot series in the CPlotView.
nSeries = CPlotView:GetIndex() |
On success, this method returns nSeries > 0.
On failure, this method returns 0.
A plot window can show all series at once if in over-plot mode, or it can display only the current series in animation mode. Therefore, changing the current series does not affect the appearance of the plot window if the window is in over-plot mode.
The following script plots some points in different series of a CPlotView. It then sets the index back to the first series and returns some information about the current series:
|
-- create a CPlotView |
|
-- add a point to the plot data |
|
-- add 99 more points |
|
-- plot 100 points in a new plot window |
|
-- empty all the points |
|
-- add 1 point to a new set of plot data |
|
-- plot the point as a new series |
|
-- add 1 point to a new set of plot data |
|
-- plot the point as a new series |
|
-- go back to series 1 |
|
-- number of plot series |
|
-- index of current series |
|
-- result: n=3, cur=1 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.