Michael Kordosky <kordosky@dell4.hep.utexas.edu> writes: > Hi, > > I am trying to set the axis range on a histogram with the following lines: > > TFile* f = new TFile("mode-04-plots.root","READ"); > > TH1F* h1 = (TH1F*)f->Get("channel_0"); > > can->cd(4); //A divided TCanvas > > h1->GetXaxis->SetRange(((h1->GetMaximumBin())-100), > ((h1->GetMaximumBin())-400)); > h1->DrawCopy(); > > These lines produce the error message: > > Error: Can't call > TH1F::GetXaxis->SetRange(((h1->GetMaximumBin())-100), > ((h1->GetMaximumBin())-400)) Hi Michael, there are missing parentheses in GetXaxis call. It should read h1->GetXaxis()-> cheers Jiri
This archive was generated by hypermail 2b29 : Fri Jun 08 2001 - 11:51:21 MEST