Histogram plotting inconsistencies (bug)
What
The Histo1D
object (attempts) to save output plots as .png
files but tells gnuplot
to store the plot as postscript
. See here.
The Histo2D
object saves output plots as .png
files and (correctly/adequately) tells gnuplot
to store the plot as png
. See here. Histo3D
does the same, see here.
So there is an inconsistency in how Histo1D
objects are stored as images. I ran into this issue because when attempting to view the output plots from scans, only the two-dimensional histograms were able to be rendered by the Preview program on mac OS (I am running macOS Catalina 10.15.6). All one-dimensional histograms (with .png
) were not able to be rendered by Preview.
Solution/Suggested fix
Changing the gnuplot
command to be the same as Histo2D
and Histo3D
for Histo1D
solves the problem, or keeping the command the same but changing the output extension to .eps
seems to fix the issue. I am curious about the latter, since I would have expected Preview to be able to inspect the file format independently of the extension in the file name.
Is there any reason we want to treat the output formats differently between the histograms?