Re: [ROOT] How to get x- and y-range of displayed histogram

From: Olivier Couet (Olivier.Couet@cern.ch)
Date: Tue Jun 01 2004 - 17:57:08 MEST


Hi Thomas,

 I guess it is: 

 h.GetMaximum();
 h.GetMinimum();

 Cheers,      Olivier

On Tue, 1 Jun 2004, Thomas Bretz wrote:

> Dear all,
> 
> I display a histogram, eg
> TH1F h("", "", 10, 0, 1);
> h.Fill(0.5);
> h.Draw();
> 
> The displayed range in x I get calling:
> h.GetXaxis()->GetXmin();
> h.GetXaxis()->GetXmax();
> 
> Doing the  same for the y-axis fails. How do I get this range? (The aim 
> is to draw a line from through the histogram)
> 
> Thanks in advance,
> Thomas.
> 
> 

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet@cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7677155



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET