Impossible to set y-axis range after drawing THStack?

Hello,

I can’t seem to control the range of the y axis of a pad with a THStack drawn on it.
I’ve tried stack->GetYaxis()->SetRangeUser(), stack->GetHistogram()->GetYaxis()->SetRangeUser(),
stack->GetYaxis()->SetLimits(), stack->GetHistogram()->GetYaxis()->SetLimits().
Nor can I “SetRangeUser” from the TAxis::yaxis menu.
However SetRangeUser() works fine on the x axis, both in code and from the menu.

Is it not possible to do this? I’m using 5.26.
Thanks,
-PD

On the free axis (the one depending on the bin content) use SetMaximum, SetMinimum (in TH1)

Rene

[quote=“brun”]On the free axis (the one depending on the bin content) use SetMaximum, SetMinimum (in TH1)

Rene[/quote]

In this case I assume you mean SetMaximum,SetMinimum in THStack, otherwise it doesn’t work. Thanks Rene, I didn’t realize it worked that way.
-PD