CPlotView:AddSeries
The AddSeries method appends the class data matrix as a new plot series in the current plot window.
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. |
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.
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:
|
-- clear existing data from the array |
|
-- x, y, xerrorbar, yerrorbar |
|
-- x, y, xerrorbar, yerrorbar |
|
-- x, y, yerrorbar |
|
-- x, y, yerrorbar |
|
-- add the data as a new series |