CPlotView:delete CPlotView:GetViewPtr

CPlotView:Attach


The Attach method attaches the top most window (a Plot window) to the script and creates a new CPlotView object for it.

Syntax

NewPlotView_Object = CPlotView:Attach()

Remarks

Use Attach to run the script on the top-most Plot window. To do this, bring the target Image window to the top of the stack and run the script using the [ ! ] button on the main toolbar.

Note: This method creates a new CPlotView\ object, so the new constructor should not be called.

Example

Suppose you want the script to add a new data set to a plot the top-most window. The following script attaches the top-most window (a Plot window) to the script and adds the class data buffer as a new series:

 

V = CPlotView:Attach()

-- attach the top-most Plot window

V:AddSeries( "New Data" )

-- plot the class data matrix with a caption

Related Topics

CPlotView, CImageView::Attach