CPlot:PlotPoint Table


The PlotPoint table is a name-keyed table that contains the data for each individual point in the plot series managed by the CPlot class. The table below describes the table membersfor each point.

 

Name

Description

x

The x coordinate of the point.

y

The y coordinate of the point.

xe

The x error bar size of the point.

ye

The y error bar size of the point.

status

Specified the status of the point. Typically all points will have a status of 0 ("normal") unless the plot was altered by a data rejection or fitting procedure.

0: normal

1: deleted

2: rejected

3: weighted

visible

boolean true if the point is visible in the CPlotView window.

Example

The following script attaches a CPlotView from the Mira desktop and prints the properties of the point at index 15 in plot series 1:

V = attachlist_plotview()

-- select the target plot window

if V == nil then Exit() end

-- if not successful, exit the script

P = V:GetPlot(1)

-- get a CPlot object for series 1

if P == nil then Exit("Bad series") end

 

Pt = P:GetPt(15)

-- Get the point data for index 15

if Pt == nil then Exit("point 15 is nil") end

 

-- print the properties of the point at index 15

 

Printf("(x,y), (xe,xe), stat, vis\n")

-- print a table heading

Printf("(%lg,%lg), (%lg,%lg), %d, %d\n",

 

       Pt.x, Pt.y, Pt.xe, Pt.ye, Pt.status, Pt.visible)

-- print the PlotPoint table

Related Topics

CPlotView class, CPlot class, GetX, GetY, GetXY, ToTable


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