TGarph Axes Ranges

From: Norbert Danneberg (norbert.danneberg@psi.ch)
Date: Fri Aug 13 1999 - 19:27:06 MEST


Hi, 

I am trying to set the X and Y axses-ranges of a TGraph 
by hand. I found the following solution:

MuSRFitGraph->GetYaxis()->SetRange(MuSRFitGraph->GetYaxis()->FindBin(-0.004),MuSRFitGraph->GetYaxis()->FindBin(0.004))

which seams rather strange and complicated to me. 

I am wondering if somebody knows an easier way to do it.
Moreove ist does not work for the Y-Axis. For the Y Asxis 
I use 

MuSRFitGraph->SetMaximum(0.004);
MuSRFitGraph->SetMinimum(-0.004);

I guess the reason for this is, that histograms are used 
to draw TGraphs. Why should Y and X Axes of a graph 
be different ?? 

I guess implementing to four new memberfunctions like
SetXMin() SetXMax() SetYMin() SetYMax() for TGraph is probably
straightforward.


Peace 

norbert



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET