use of gdsc.core.utils.DoubleData in project GDSC-SMLM by aherbert.
the class CMOSAnalysis method showHistogram.
private void showHistogram(String name, double[] values, int bins, Statistics stats, WindowOrganiser wo) {
DoubleData data = new StoredData(values, false);
double minWidth = 0;
int removeOutliers = 0;
// Plot2.BAR; // A bar chart confuses the log plot since it plots lines to zero.
int shape = Plot.CIRCLE;
String label = String.format("Mean = %s +/- %s", Utils.rounded(stats.getMean()), Utils.rounded(stats.getStandardDeviation()));
int id = Utils.showHistogram(TITLE, data, name, minWidth, removeOutliers, bins, shape, label);
if (Utils.isNewWindow())
wo.add(id);
// Redraw using a log scale. This requires a non-zero y-min
Plot plot = Utils.plot;
double[] limits = plot.getLimits();
plot.setLimits(limits[0], limits[1], 1, limits[3]);
plot.setAxisYLog(true);
Utils.plot.updateImage();
}
Aggregations