Skip to content

Commit

Permalink
Add statistics summary label to histogram plot
Browse files Browse the repository at this point in the history
  • Loading branch information
aherbert committed Sep 13, 2023
1 parent 30184bb commit 80daafa
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import uk.ac.sussex.gdsc.smlm.data.config.FitProtosHelper;
import uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF;
import uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter;
import uk.ac.sussex.gdsc.smlm.data.config.PsfHelper;
import uk.ac.sussex.gdsc.smlm.data.config.UnitHelper;
import uk.ac.sussex.gdsc.smlm.ij.settings.GUIProtos.SummariseResultsSettings;
import uk.ac.sussex.gdsc.smlm.ij.settings.SettingsManager;
Expand Down Expand Up @@ -465,7 +464,11 @@ private static void plot(HistogramPlotBuilder plotBuilder, WindowOrganiser wo, S

private static void plot(HistogramPlotBuilder plotBuilder, WindowOrganiser wo, String title,
StoredDataStatistics data) {
plotBuilder.setName(title).setData(data).show(wo);
plotBuilder.setName(title).setData(data)
.setPlotLabel(String.format("%s +/- %s (%d)",
MathUtils.rounded(data.getMean()), MathUtils.rounded(data.getStandardDeviation()),
data.getN()))
.show(wo);
}
}
}

0 comments on commit 80daafa

Please sign in to comment.