CPlotView:GetIndex
The GetIndex method returns the index of the current plot series in the CPlotView.
nSeries = CPlotView:GetIndex() |
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 fragment 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 data array |
|
-- add 99 more points |
|
-- plot 100 points in a new plot window |
|
-- empty all the points |
|
-- add 1 point to a new data array |
|
-- plot the point as a new series |
|
-- add 1 point to a new data array |
|
-- 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 |