PlotAttrib Table
The PlotAttrib table contains information ("attributes") about the CPlotView window. This table is returned using the GetAttrib method. Remember that table values are accesses using the cot operator, like tbl.sWindowTitle.
PlotAttrib = CPlotView:GetAttrib()
Returns a PlotAttrib table filled with attributes of the
CPlotView window
On
failure, nil is
returned.
After calling CPlotView:GetAttrib(), the PlotAttrib table contains the following value in the table below. All values except nSeriesCount and nSeriesIndex are also copied into the CPlotView class properties.
Property |
Default Value |
Description |
sWindowTitle |
nil (string) |
The title of the plot window. |
nSeriesCount |
0 |
The number of plot series in the plot window. |
nSeriesIndex |
0 |
The index of the current plot series. The first series in a plot window has index 1. |
sCaption |
nil (string) |
The caption of the current plot series. |
sDescription |
nil (string) |
An optional description of the current plot series. |
sLabelX |
nil (string) |
The label for the plot X axis. |
bPosAxisX |
true |
True if the X axis increases to the right. |
bAutoscaleX |
true |
True if the X axis range is autoscaled. |
nMinX |
0 |
The minimum xalue of the X axis at the edge of the plot box. |
nMaxX |
0 |
The maximum xalue of the X axis at the edge of the plot box. |
sLabelY |
nil (string) |
The label for the plot Y axis. |
bPosAxisY |
true |
True if the Y axis increases to the right. |
bAutoscaleY |
true |
True if the Y axis range is autoscaled. |
nMinY |
0 |
The minimum xalue of the Y axis at the edge of the plot box. |
nMaxY |
0 |
The maximum xalue of the X axis at the edge of the plot box. |
The following script returns a filled PlotAttrib table for a selected CPlotView on the Mira desktop. It then instructs the plot window to display the number of series minus 1 as the current series:
|
-- select the plot window froma list |
|
-- if not successful, exit the script |
|
-- get the attributes table |
|
|
|
-- number of series in the plot window |
|
-- if more series than current series |
|
-- set current series to n-1 |
|
|
Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.