CPlotView:GetPtY
The GetY method returns the y value of a point in the class data matrix.
y = CPlotView:GetPtY( n ) |
n is the index of the point in the plot data.
y is the point y coordinate.
On success, this method returns the y coordinate.
On failure, this method returns 0.
This method returns the y value of the specified point at index n. If n is out of range, the value 0 is returned. To remove ambiguity about whether the point truly has a value of 0 or is out of bounds, check the index before calling this method.
The following script adds some points, then finds the nearest point and prints its x value:
|
-- create a new CPlotView |
|
-- add a point |
|
-- add a point |
|
-- get index of point nearest 4,72 |
|
-- result: n = 1, y = 70.5 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.