CPlotView:SetIndex
The SetIndex method changes the current plot series index to a specified value.
bSuccess = CPlotView:SetIndex( nSeries ) |
nSeries is the series index in the range 1 to Count.
On success, this method returns true
On failure, this method returns false.
A plot window shows all series simultaneously in over-plot mode, or it displays only the current series in animation mode. Therefore, if the plot window is in over-plot mode, changing the current series does not affect the appearance of the window.
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 internal data matrix |
|
-- add 99 more points |
|
-- plot 100 points in a new plot window |
|
-- empty all the points |
|
-- add 1 point to a new internal data matrix |
|
-- plot the point as a new series |
|
-- add 1 point to a new internal data matrix |
|
-- 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, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.