[ROOT] Range of y axis of a histogram

From: Michael Wiesmann (wiesmann@e18.physik.tu-muenchen.de)
Date: Mon Mar 31 2003 - 20:19:35 MEST


Dear Thilo!

A 1d histograms doesnt have a "real" yaxis as it is 1 dimensional ...

Want you probably want is
	h->GetMaximum();
	h->GetMinimum();

Greets,
Michael





t.pauly1@physics.ox.ac.uk writes:
 > Dear Root experts,
 > 
 > I'd like to get the range of the y axis of a histogram h. I have tried:
 > 
 >   double ymax = h->GetYaxis()->GetXmax();
 >   double ymin = h->GetYaxis()->GetXmin();
 > 
 > which gives me ymax = 1 and ymin = 0, which is not the range I see when I
 > plot h.
 > 
 > On the other hand if I do the same for the x axis, I get the range I want.
 > Do you have an idea how to get those numbers? I am using version 3.05/00.
 > 
 > Thanks a lot,
 > Thilo
 > 
 > 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET