new_plotview CPlotView:GetPtErrY

PlotAttrib Table


The PlotAttrib table contains information ("attributes") about the CPlotView window. This table is returned for the current CPlotView using the GetAttrib method and is set using the SetAttrib method. Remember that table values are accessed using the dot operator, like tbl.nMinX, not the colon operator used for class methods.

Syntax

PlotAttrib = CPlotView:GetAttrib()

bullet.gif    Returns a PlotAttrib table filled with attributes of the CPlotView window

bullet.gif    On failure, nil is returned.

PlotAttrib Properties

After calling CPlotView:GetAttrib, the PlotAttrib table is filled with the plot window properties listed in the table below.

Property

Default Value

Description

sWindowTitle

nil (string)

The title of the plot window.

sCaption

nil (string)

The caption of the current plot series.

sDescription

nil (string)

An optional description of the current plot series.

X Axis Properties

 

 

sLabelX

nil (string)

The label for the plot X axis.

bPosAxisX

true

True if the X axis increases rightward.

bAutoscaleX

true

True if the X axis range is autoscaled.

nMinX

0

The minimum X value of the plot box.

nMaxX

0

The maximum X value of the plot box.

Y Axis Properties

 

 

sLabelY

nil (string)

The label for the plot Y axis.

bPosAxisY

true

True if the Y axis increases upward.

bAutoscaleY

true

True if the Y axis range is autoscaled.

nMinY

0

The minimum Y value of the plot box.

nMaxY

0

The maximum Y value of the plot box.

Example

The following script returns a filled PlotAttrib table for the CPlotView object. The script then prints the plot limits on the X axis:

V = attachlist_plotview()

-- select the plot window from a list

if V == nil then Exit("Bad CPlotView") end

-- if not successful, exit the script

tbl = V:GetAttrib()

-- get the attributes table

if tbl == nil then Exit("table failed") end

 

Printf("X range: %lg %lg\n", tbl.nMinX, tbl.nMaxX)

-- print the limiting X values

Related Topics

CPlotView class

GetAttrib

GetIndex

SetIndex

GetTitle

SetTitle

SetAttrib

 


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