Bincontent over maxYaxis when hist->Draw("same") option

_ROOT Version:_6.08.06
Platform: Ubuntu16.04
Compiler: gcc530

When I have two histograms with h1 and h2


The pad’s maximum Y value always fits the maximum Y value of the first drawn histogram.
However, in many occasions, h2’s maximum Y value could be larger, thereby overshooting the bincontent.

Is there any convenient way to adjust this situation such that the pad’s maximum value automatically sets to the maximum Y value of whichever histogram drawn?
(I am aware of h1->GetYaxis()->SetRangeUser() method, but wonder if there were any easier and convenient way to handle the situation)
Thank you.

I do not want a stacked histogram, but rather overlapped histograms

SomeTHStack->Draw(“nostack”); // “nostack” … or … “nostackb”

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