Drawing histograms to the same canvas without overlaps


I’d like to make one of my plots a bit prettier and I don’t know how to do it.
When drawing a TH1 histogram, with the bar option, you can simply use histo->SetBarOffset(double offset) to choose, where in the complete bin the bar should start, horizontally. Is there an option like that works with other drawing options, so that similar hisograms don’t overlap? Please check out my example screenshot. I used the drawing option histo->Draw(“PLC PMC E1”). Anything similar looking would be fine, I just don’t want them to overlap, so that all points and error bars of both diagrams can be seen completely.

Thank you in advance


1 Like

@couet could you give a hand with this one?

The Bar Offset setting does not apply on error bars. To produce what you are asking with the current ROOT version you would need to, somehow, shift the 2nd histogram you are drawing. Also an other way might be to plot the 1st histogram with thicker line width which might help to see it. Can you provide a small script reproducing the picture you posted ? I can then have a closer look …


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.