Histos with different scales and a zoomed axis


I’m using version 4.0.4/02.

I want to superimpose two histos with different scales, as in the example here:

HOWEVER I want to zoom in on the axis of the first histogram, then plot the other.

I used hist1->SetMinimum() and hist1->SetMaximum() to zoom, but then when I scale and draw hist2 some of my data points fall off the bottom of the pad due to my zoom…

Code and plots attached.
Many thanks in advance.

plot2.pdf (6.02 KB)
plot.pdf (6.45 KB)
cal.cxx (1.61 KB)


I cannot execute your macro because the file “CaloAnalysis.root” is missing. I looked at your pdf outputs and I do not really understand what you think is wrong with them. It would be very helpful if you can provide an example we can run.