|
CPlot:ToTable
The ToTable method creates an array
containing
PlotPoint tables, one for each point in the
plot series. Alternatively, the properties of one point may be
obtained using the
GetPt method.
Syntax
tbl = CPlot:ToTable()
where
tbl is an array of
PlotPoint tables (see below).
On failure,
nil is returned.
Example
The following script attaches a
CPlotView from the Mira desktop and prints the
point data for plot series 1:
|
V = attachlist_plotview()
|
|
|
if V == nil then Exit() end
|
|
|
P = V:GetPlot(1)
|
|
|
if P == nil then Exit("Bad series")
end
|
|
|
tbl = P:ToTable()
|
|
|
if tbl == nil then Exit("table is
nil") end
|
|
|
|
|
|
Printf("Index, (x,y), (xe,xe), stat,
vis\n")
|
|
|
for n = 1, #tbl do
|
|
|
t = tbl[n]
|
|
|
Printf("[%d] =
(%lg,%lg), (%lg,%lg), %d, %d\n",
|
|
|
n, t.x,
t.y, t.xe, t.ye, t.status, t.visible)
|
|
|
end
|
|
Related Topics
CPlotView class
CPlot class
GetPt
PlotPoint table
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|