Replaces the specified plot object (curve or set of points). Equivalent to add() if there are no plot objects.
(int index, String type, double[] xvalues, double[] yvalues)
| 818 | /** Replaces the specified plot object (curve or set of points). |
| 819 | * Equivalent to add() if there are no plot objects. */ |
| 820 | public void replace(int index, String type, double[] xvalues, double[] yvalues) { |
| 821 | if (index>=0 && index<allPlotObjects.size()) { |
| 822 | objectToReplace = allPlotObjects.size()>0?index:-1; |
| 823 | add(type, xvalues, yvalues); |
| 824 | } |
| 825 | } |
| 826 | |
| 827 | /** Adds a curve, set of points or error bars to this plot, where 'type' is |
| 828 | * "line", "connected circle", "filled", "bar", "separated bar", "circle", "box", |