I am having trouble to identify how exactly is calculated the plotted x & y range of a histogram when “Draw” is invoked.
If one uses Draw for one histogram, and then Draw(“same”) for a second histogram that happens to have a wider y-axis range than the first histogram, then the second histogram is clipped off in the plot.
I would ike to get the maximum value in the plotted range of the y-axis of the first histogram, set the plotted range of y-axis of the second histogram to that value (with SetRangeUser?) and then Draw(“same”) the second histogram to superpose it on the first histogram.
I haven’t been able to figure out how to retrieve the y-axis range of the first histogram as set by Draw, and then use that for the second histogram. I would have thought this value is
which seems to work from a CINT window but returns 1 from inside a macro.
What is the best sequence of commands to do this?