CPlot:GetX
The GetX method returns the x value of the point at an index in a plot series.
x, success = CPlot:GetX( nIndex ) |
nIndex is the index of the plot series, from 1 to CPlot:Count.
x is the x value of the point.
success is a boolean value and is true if the index is valid. This second argument may be omitted if the index is known to be valid.
On failure 0,false is returned.
The following script gets the x value of the 15th point in plot series 1 of a CPlotView on the Mira desktop:
|
-- select the target plot window |
|
-- if not successful, exit the script |
|
-- get a CPlot object for series 1 |
|
|
|
-- choose the point at index 15 |
|
-- get the x value at nIndex |
|
|
|
-- print the results |
|
|
|
-- bad index |
|
|
CPlotView class, CPlot class, GetY, GetXY, GetPt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.