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

Method drawHorizontalErrorBars

ij/src/main/java/ij/gui/Plot.java:3889–3901  ·  view source on GitHub ↗
(float[] x, float[] y, float[] e)

Source from the content-addressed store, hash-verified

3887 }
3888
3889 private void drawHorizontalErrorBars(float[] x, float[] y, float[] e) {
3890 int nPoints = Math.min(Math.min(x.length, y.length), e.length);
3891 float[] xpoints = new float[2];
3892 float[] ypoints = new float[2];
3893 for (int i=0; i<nPoints; i++) {
3894 if (Float.isNaN(x[i]) || Float.isNaN(y[i]) || (logXAxis && !(y[i] >0))) continue;
3895 int y0 = scaleY(y[i]);
3896 int xPlus = scaleXWithOverflow(x[i] + e[i]);
3897 int xMinus = scaleXWithOverflow(x[i] - e[i]);
3898 ip.moveTo(xMinus,y0);
3899 ip.lineTo(xPlus, y0);
3900 }
3901 }
3902
3903 /** Draw a polygon line; NaN values interrupt it. */
3904 void drawFloatPolyline(ImageProcessor ip, float[] x, float[] y, int n) {

Callers 1

drawPlotObjectMethod · 0.95

Calls 5

scaleYMethod · 0.95
scaleXWithOverflowMethod · 0.95
minMethod · 0.45
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected