Dear all,
I’m working with ROOT 5.34/30. I have a plot which is made of some histograms by THStack. I’m trying to change axis range by this piece of code :
TCanvas c1;
hsb->Draw();
hsb->GetXaxis()->SetRangeUser(4, 400);
hsb->GetYaxis()->SetRangeUser(0, 9);
The X axis range changes properly, but Y axis range DOESN’T CHANGE. I also tried this :
hsb->GetYaxis()->SetLimits(0, 9);
But still no change in Y axis range. Being disappointed, I had to use this method :
hsb->SetMaximum(9);
This WORKS. But still I have a question that why SetRangeUser & SetLimits methods don’t work.
Any help will be highly appreciated.
Thanks in advance