Re: [ROOT] SetRangeUser Problem on Y-axis

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Mar 20 2002 - 10:33:17 MET


Hi Steffen,

When you use the option "a" in TAxis::Draw, the axis limits are
automatically recomputed from the range of the actual Y values.
You can force a max/min of the y axis via TAxis::SetMaximum/SetMinimum.
An alternative solution is to use TPad::DrawFrame.

Rene Brun


Steffen Grohmann wrote:
> 
> Hello,
> 
> I am trying to use the SetRangeUser function in a TGraph object. While
> the function works fine for the x-axis, it doesn't work at all at the
> Y-axis. The scaling of the Y-axis is always reset to some "pre-definded"
> range (depending on the data) and cannot be changed.
> I have tried to insert a "dummy graph" first and then superimposed my
> real graphs without drawing the axis. This works in principle but there
> is still some trial and error needed to hit the desired axis range
> (because the range is always bigger than the biggest value).
> I wonder whether there is a more elegant method the scale the y-axis
> independently from the data.
> 
> Regards, Steffen
> --
> 
> +------------------------------------------------------+
> |Steffen Grohmann             steffen.grohmann@cern.ch |
> +------------------------------------------------------|
> |CERN                                                  |
> |European Organization for Nuclear Research            |
> |ST Division                                           |
> |CH-1211 Geneve 23             phone:   +41 22 767-7079|
> |Switzerland                   fax:     +41 22 767-8767|
> +------------------------------------------------------+



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