CPlotView:GetAttrib


The GetAttrib method returns a PlotAttrib table containing the general properties of the plot window atached to a CPlotView object.

Example

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:

V = attachlist_plotview()

-- select the target plot window

if V == nil then Exit() end

-- if not successful, exit the script

tbl = V:GetAttrib()

-- get the attributes table

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

 

Printf("Series Count = %d\n", tbl.nSeriesCount)

-- number of series in the plot window

if nSeriesCount > nSeriesIndex then

-- if more series than current series

  V:SetIndex(nSeriesCount - 1)

-- set current series to n-1

end

 

Related Topics

CPlotView class

PlotAttrib Table

 


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