[ncl-talk] Plotting 2 histograms side by side (not overlapping)
Dagon, Katie
kdagon at fas.harvard.edu
Thu Jan 12 09:14:15 MST 2017
Hello all,
Does anyone know how to plot 2 histograms side by side instead of overlapping (as is done by default with the gsnHistogramCompare function)?
I have tried using "res at gsnHistogramSideBySide = True”, however that shifts the distributions slightly to the left, so the values do not line up with the correct labels on the x axis. I have not been able to determine why this happens, though it may be that SideBySide assumes it will have at least 3 datasets, instead of 2.
Ideally, I would like the distributions to sit side by side with some white space on either side of the x axis tick marks.
Thanks in advance for any help. I have attached two plot examples when using histogram compare versus sidebyside. The compare figure shows the data in its correct position with respect to the x axis, and the side-by-side figure is shifted to the left. I am using NCL version 6.2.1.
Katie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compare.pdf
Type: application/pdf
Size: 30539 bytes
Desc: compare.pdf
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170112/56e7e51c/attachment.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: side-by-side.pdf
Type: application/pdf
Size: 26969 bytes
Desc: side-by-side.pdf
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170112/56e7e51c/attachment-0001.pdf
More information about the ncl-talk
mailing list