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

From: Mina Nozar (nozarm@jlab.org)
Date: Tue Mar 20 2001 - 03:16:27 MET


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