Login  Register

Re: horizontal error bars using Plot function

Posted by Neil Fazel on Jul 09, 2014; 9:50pm
URL: http://imagej.273.s1.nabble.com/horizontal-error-bars-using-Plot-function-tp5008640p5008662.html

Thanks very much for making this available. I tried it and it works.

A comment: I noticed that in order to get the error bars displayed, I needed to pass the X and Y arrays when calling Plot.create(). Something like the following, which adds data points via calls to Plot.add(), does create plot points (in red), connected by lines (in light gray), but error bars do not appear:

    Plot.create("Spectrum"," E[keV]", "#photons / keV / sr");
    Plot.setLimits(0, 75, 0, max*1.3);
    Plot.setLineWidth(2);
    Plot.setColor("lightGray");
    Plot.add("line", energies, spectrumPoints);
    Plot.setColor("red");
    Plot.add("circles", energies, spectrumPoints);
    Plot.setColor("black");
    Plot.add("yerrors", verticalErrors);
    Plot.add("xerrors", energyErrors);
    Plot.show();

Best regards,
Neil

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html