MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / addPoints

Method addPoints

ij/src/main/java/ij/gui/Plot.java:850–862  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

multiPlotMethod · 0.95
analyzeMethod · 0.95
showPlotMethod · 0.95
plotMethod · 0.95
getPlotMethod · 0.95
PlotMethod · 0.95
addMethod · 0.95
runMethod · 0.95
updatePlotMethod · 0.95
addToPlotMethod · 0.45
addObjectFromTableMethod · 0.45
addFitCurveMethod · 0.45

Calls 6

updateImageMethod · 0.95
toFloatMethod · 0.95
addMethod · 0.65
setMethod · 0.45
duplicateMethod · 0.45

Tested by

no test coverage detected