Re: [ROOT] TGraphErrors and How to change the axis range.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Mar 20 2001 - 09:10:00 MET


Hi Mina,
If you want to plot several TGraph (TGraphErrors) on the same pad,
I encourage you to use the class TMultiGraph. The scale is
automatically computed for all the graphs member of a TMultiGraph.

Rene Brun

On Mon, 19 Mar 2001, Mina Nozar wrote:

> Hi all,
> 
> I am trying to plot three graphs on the same axis (i.e. same axis
> setting).  When I draw the first set of points, root sets the axis range
> so that all points show on the graph (which is fine), but once I draw
> the second set of points on the same graph, some of the points are "not
> visible" since they are "out of range".   I can't set the y-axis setting
> by doing the following:
> 
> gr = new TGraphErrors(n,m,y1,em,ey1);
> gr->GetYaxis()->SetRange(0,105000);
> 
> For some reason, I can't reset the axis, using the GUI (Range) either.
> Well, I can change the numbers, but once I close the window, nothing
> happens and when I redraw the graph, the
> axis range is the same as before.
> 
> Is there a way I can set the y-axis range to what I want?
> 
> Thanks,
> mina
> 
> --
> Mina Nozar
> nozarm@jlab.org ----- Phone:(757)269-6391 ----- FAX:(757)269-5800
> Thomas Jefferson National Accelerator Facility
> MS 12H, 12000 Jefferson Ave. Newport News, VA 23606
> 
> 
> 



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