Hi Jeff, What you do should work g->Draw("ap"); g->SetMinimum(0); if not, please send me a short but running script showing the problem. Rene Brun On Fri, 6 Dec 2002, Jeff Hartnell wrote: > Hi, > It seems to be impossible to override the automatic axis scaling in > TGraph when you draw it with the "a" option. > > I found this in the digest: > > From: Rene Brun (Rene.Brun@cern.ch) > Date: Wed Mar 20 2002 - 10:33:17 MET > > a.. Next message: Rene Brun: "Re: [ROOT] TGaxis" > b.. Previous message: Rene Brun: "Re: [ROOT] TGeant3, TGeant4 from > AliSoft" > c.. In reply to: Steffen Grohmann: "[ROOT] SetRangeUser Problem on > Y-axis" > d.. Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] > > ------------------------------------------------------------------------ > -------- > > > 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 > > but TAxis doesn't have SetMaximum or minimum does it? > > I do this: > > gAdcPhNear[l]->Draw("AP"); > gAdcPhNear[l]->SetMinimum(0); > > but it still gets drawn with the minimum above zero. Why doesn't this > work? Can it be made to work? > > Has anyone found a solution to this problem? I could always draw a > histogram first with the appropriate scale, but that's ugly! > Thanks, > Jeff. > > p.s. using latest root on redhat 7.3.1 > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:22 MET