[ROOT] Axis Range

From: Michael Kordosky (kordosky@dell4.hep.utexas.edu)
Date: Wed Mar 14 2001 - 23:51:22 MET


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))
in current scope FILE:mode-04-plots.C LINE:54
Possible candidates are...
filename       line:size busy function type and name  (in TH1F)
filename       line:size busy function type and name  (in TH1)
filename       line:size busy function type and name  (in TNamed)
filename       line:size busy function type and name  (in TObject)
filename       line:size busy function type and name  (in TAttLine)
filename       line:size busy function type and name  (in TAttFill)
filename       line:size busy function type and name  (in TAttMarker)
filename       line:size busy function type and name  (in TArrayF)
filename       line:size busy function type and name  (in TArray)
*** Interpreter error recovered ***

Could someone point out what I am doing wrong?

Mike Kordosky

-- 
Graduate Research Assistant  // High Energy Physics Lab
kordosky@hep.utexas.edu     // University of Texas at Austin
ph: (512) 471-8426 (RLM Lab, Office)
    (512) 475-8673 (ENS Lab)



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:39 MET