Hi,
I need to access the range of the y axis of a TH1F. GetXmax() seems to always return 1, regardless of the actual range.
TH1F h("h","h",100,0,100)
h->Draw()
h->Fill(0.5)
h->Fill(0.5)
h->Fill(0.5)
h->Fill(0.5)
h->Draw() // maximum is 4 something
h->GetMaximum() // returns 4
h->GetYaxis()->GetXmax() // returns 1
h->GetYaxis()->SetRangeUser(0,5)
h->Draw() // maximum is 5
h->GetYaxis()->GetXmax() // again returns 1
Thanks,
- Moritz