Re: [ROOT] Trouble with GetUymax()

From: Fabrizio Pierella (Fabrizio.Pierella@cern.ch)
Date: Thu Sep 05 2002 - 14:32:15 MEST


Hi Takefumi,

after drawing the histogram you have to update the canvas
 just as an example

void Takefumi()  
{
   TCanvas *c1 = new TCanvas("c1","Takefumi",600,400); 

   TH1F *h1 = new TH1F("h1","histogram",100,-3,3); 
   Int_t i; 
   for (i=0;i<10000;i++) h1->Fill(gRandom->Gaus(0,1)); 
   h1->Draw(); 
   c1->Update(); 

   Float_t ymax = gPad->GetUymax(); 
   cout << ymax << endl;  
}

Regards
			Fabrizio



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET