CPlotView:GetPtErrX


The GetPtErrX method returns the x errorbar value of a point in the class data matrix.

Syntax

xErr = CPlotView:GetPtErrX( n )

bullet.gif    n is the index of the point in the plot data.

bullet.gif    xErr is the value of the x errorbar.

bullet.gif    On success, this method returns the x errorbar value.

bullet.gif    On failure, this method returns 0.

Remarks

This method returns the x errorbar 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 an x errorbar value of 0 or is out of bounds, check the index before calling this method.

Example

The following script adds some points, then finds the nearest point and prints its x errorbar value:

P = new_plotview()

-- create a new CPlotView

P:Add( 11.82, 70.5, 10.25, 12.4)

-- add a point

P:Add( 4.62, 90.5, 11.5, 10.2)

-- add a point

n = P:FindPoint( 4, 72)

-- get index of point nearest 4,72

Printf("n=%d,xerr=%lg\r\n",n,P:GetPtErrX(n))

-- result: n = 1, xerr = 10.25

Related Topics

CPlotView class, GetPtErrY


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.