Adds a set of points to the plot or adds a curve if shape is set to LINE. @param xValues the x coordinates, or null. If null, integers starting at 0 will be used for x. @param yValues the y coordinates (must not be null) @param yErrorBars error bars in y, may be null @param shape CIRCLE, X, BOX, TR
(float[] xValues, float[] yValues, float[] yErrorBars, int shape, String label)
| 848 | * example macro and in add(String, double[], double[]) (without the 'code:') |
| 849 | */ |
| 850 | public void addPoints(float[] xValues, float[] yValues, float[] yErrorBars, int shape, String label) { |
| 851 | if (xValues==null || xValues.length==0) { |
| 852 | xValues = new float[yValues.length]; |
| 853 | for (int i=0; i<yValues.length; i++) |
| 854 | xValues[i] = i; |
| 855 | } |
| 856 | if (objectToReplace>=0) |
| 857 | allPlotObjects.set(objectToReplace, new PlotObject(xValues, yValues, yErrorBars, shape, currentLineWidth, currentColor, currentColor2, label, offScreenDisplacementArrowControl.duplicate())); |
| 858 | else |
| 859 | allPlotObjects.add(new PlotObject(xValues, yValues, yErrorBars, shape, currentLineWidth, currentColor, currentColor2, label, offScreenDisplacementArrowControl.duplicate())); |
| 860 | objectToReplace = -1; |
| 861 | if (plotDrawn) updateImage(); |
| 862 | } |
| 863 | |
| 864 | /** Adds a set of points to the plot or adds a curve if shape is set to LINE. |
| 865 | * @param x the x coordinates |
no test coverage detected