Re: [ROOT] Axis

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Aug 31 2001 - 16:54:10 MEST


Hi Giuseppe,

To zoom an already filled histogram do:

  h->GetXaxis()->SetRange(binmin,binmax);

where binmin,binmax are the lower and upper bin number.
You can find the correspondance between axis values and bin numbers via
  TAxis::FindBin

Rene Brun

Giuseppe Lo Re wrote:
> 
> Rene Brun wrote:
> >
> > Use h->GetXaxis()->SetLimits(xmin,xmax);
> >
> > Rene Brun
> >
> > Giuseppe Lo Re wrote:
> > >
> > > Hi Rooters,
> > > I have defined an histogram bur now I want to change the x-axis limits.
> > > How can I do?
> > > Thanks for any help,
> > >         Giuseppe Lo Re
> 
> I tried but h->GetXaxis()->SetLimits(xmin,xmax) acts only on the scale
> while the histogram doesn't change.



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