CPlotView:AddSeries
The AddSeries method appends the class data matrix as a new plot series in the current plot window.
CPlot, nSeries = CPlotView:AddSeries( sCaption=nil )
sCaption is the optional plot caption. If nil, a default is used.
On success, CPlot is a new CPlot object attached to the plot series at index nSeries. On failure, nil, 0 is returned.
|
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 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 |
CPlotView class, AddPoints, PlotPoints
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.