|
CPlotView:GetIndex
The GetIndex method returns the index of the
current plot series in the CPlotView.
Syntax
|
nSeries = CPlotView:GetIndex()
|
On success,
this method returns nSeries > 0.
On failure,
this method returns 0.
Remarks
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.
Example
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:
|
V = new_plotview()
|
|
|
V:Add( 25, 66.5)
|
|
|
...
|
|
|
V:PlotPoints()
|
|
|
V:Empty()
|
|
|
V:Add( 20, 51.4)
|
|
|
V:AddSeries()
|
|
|
V:Add( 32, 100.75)
|
|
|
V:AddSeries()
|
|
|
V:SetIndex(1)
|
|
|
n = V:Count()
|
|
|
c = V:GetIndex()
|
|
|
Printf( "n=%d, cur=%d", n,c)
|
|
Related Topics
CPlotView class
SetIndex
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|