CPlot:GetPt CPlot:GetX

CPlotSetPt


The SetPt method sets properties of a plot point to those in a PlotPoint table. Before calling this method, call GetPt to return a PlotPoint table containing the properties of the point, change the desired properties, then call SetPt.

NOTE: Point data changed using this method does not update the point information set usingCPlot:SetInfo. In that case, you may need to call SetInfo again using the updated point data.

Syntax

CPlot:SetPt(nIndex, PlotPoint)

bullet.gif    where nIndex is the index of the point in the CPlot object.

bullet.gif    PlotPoint is a PlotPoint table.

bullet.gif    On failure, nil is returned.

Example

The following script attaches a CPlotView from the desktop and changes the x errorbar value for point 15 in plot series 1:

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

 

nPt = 15

-- work with point index 15

t = P:GetPt(nPt)

-- Get the point data for index 15

if t == nil then Exit("point is nil") end

 

t.xe = 0.198

-- change the x errorbar value

P:SetPt( nPt, t )

-- change the point properties

Related Topics

CPlotView class

CPlot class

GetPt

ToTable

PlotPoint table

 


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