I have a simple question which I could not find the answer to. I want to draw a histogram ratio plot as bars starting from the line y=1. My code lines look as follows (hist1 and hist2 are TH1D objects):
Thanks for the suggestion @couet, your link sends me to the function SetH1DrawOpt(); do you mean that by calling it I will automatically obtain bars as histograms? Wouldn’t there perhaps be a simple way of ‘shifting’ vertically my ratio plot so that the bottom is at 1?
I have already customised a second ratio plot (as dots with error bars) using the Divide function, and I believe it would take me a while until I translate all details to TRatioPlot, but if there is no direct way of doing this with my method I will then give TRatioPlot a try
Hi @couet, here is a reproducer of my current method (with customisations) in case you want to have a look: example_plot.py (2.8 KB)
One possible idea that came to mind is to subtract a dummy histogram [1,… , 1] from the ratio plot so that I would obtain the desired bars, although they would start from 0 and not from 1, ideally I would then “shift” the y-axis by -1, but I would not know how to do this in ROOT.