Adds a new curve to an existing plot. |
||
Syntax |
g = AddCurve() g = AddCurve(PlotId) |
|
Arguments |
Name |
Description |
|
PlotId |
Optional argument. The ID (integer value) of the plot. If omitted, the current plot is used. |
Outputs |
Name |
Description |
|
g |
Optional argument. The curve ID (integer). |
Example |
In an existing plot, add a new curve and then add points to the curve. |
|
|
Syntax |
|
|
PlotLine([1 3],[1 3]) PlotLine([1 3],[2 3],'new') PlotLine([1 2],[2 3]) AddPoint(2,2,1.3,1.6) AddCurve(2) // will add the curve in the second plot AddPoint(2,3, 1.3, 1.6) // will add point to the curve created above AddPoint(2,3, 1.4, 1.6) AddCurve() // will add the curve in the current plot AddPoint(2,2, 1.4, 1.7) AddCurve(1) // will add the curve in the first plot AddPoint(1,2, 1.5, 1.8) |
|
Comments |
AddCurve() is used together with AddPoint(). If you use DeletePlot(), the plot counter is not decremented. It is possible to use plot handles to avoid issues: r=PlotLine([1 3],[1 3]) s=PlotLine([1 3],[2 3],'new') s=PlotLine([1 2],[2 4]) AddPoint(s,2,1.3,1.6) AddCurve(s) // will add the curve in the second plot AddPoint(s,3, 1.3, 1.6) // will add point to the curve created above AddPoint(s,3, 1.4, 1.6) AddCurve() // will add the curve in the current plot AddPoint(s,2, 1.4, 1.7) AddCurve(r) // will add the curve in the first plot AddPoint(r,2, 1.5, 1.8) |
|
See Also: |