CPlotView:GetPlot


The GetPlot method returns a CPlot object for accessing the points in a plot series of a CPlotView.

Syntax

CPlot = CPlotView:GetPlot(nIndex)

CPlot = CPlotView:GetPlot()

bullet.gif    nIndex is the index of the plot series, from 1 to CPlotView:CountSeries. If omitted, the current series is selected, or defaults to series 1 if there is only 1 series in the CPlotView.

 Return value:

bullet.gif    CPlot is a new CPlot object attached to the current plot series. It is nil on failure.

Example

The following script gets a CPlot object for series 1 in a CPlotView on the Mira desktop:

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

 

nCount = P:Count()

-- number of points in the plot series

Related Topics

CPlotView class, CPlot class


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