CPlotView:AddPoints CPlotView:GetSeriesMode

CPlotView:AddSeries


The AddSeries method appends the class data matrix as a new plot series in the current plot window.

Syntax

bSuccess = CPlotView:AddSeries( sCaption=nil )

Scatter plot showing 8 (x,y) points in the first series and 4 points with errorbars in the second series.

Remarks

This method expects the target plot window to exist and contain at least one series. To the existing series is then added the entire contents of the class data matrix as 1 new series. In comparison, the AddPoints method adds the class data matrix to those already in the current plot series.

Example

Assume that a CPlotViewV exists and is attached to the window shown above. The script fragment below added the 4 points with error bars as a new series in the window:

 

V:Empty()

-- clear existing data from the array

V:Add(38.52,70.5,3,12)

-- x, y, xerrorbar, yerrorbar

V:Add(22.52,150.5,5,8)

-- x, y, xerrorbar, yerrorbar

V:Add(30.5,120.22,8)

-- x, y, yerrorbar

V:Add(46.5,90,16.5)

-- x, y, yerrorbar

V:AddSeries()

-- add the data as a new series

Related Topics

CPlotView, AddPoints, PlotPoints