RE: number axis values plotted

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Mon, 29 May 2006 18:18:06 +0200


Well, it has been that way for years now. TAxis and TGaxis are different on many other points. I do not think making that particular point the same will be a tremendous progress.
It will only make TGaxis a bit more complicated without adding functionality.
I think TGaxis is complicated enough right now.

Cheers, Olivier

-----Original Message-----
From: flucke_at_mail.desy.de [mailto:flucke_at_mail.desy.de] Sent: Monday, May 29, 2006 6:11 PM
To: Olivier Couet
Cc: Rene Brun; ROOT talk
Subject: Re: [ROOT] number axis values plotted

On Mon, 29 May 2006, Olivier Couet wrote:

> As indicated in the documentation, you should use the option "N":
>
> // Axis binning optimization.
> // -------------------------
> //
> // By default the axis binning is optimized .
> //
> // chopt='N': No binning optimization
> // chopt='I': Integer labeling
> //

Thanks for the hint. Seems that I am not good at reading documentation the last few days.
Still I think it would be nice to have it similar for both TAxis and TGaxis.

Cheers

        Gero

> On Mon, 29 May 2006 flucke_at_mail.desy.de wrote:
>
> > On Fri, 26 May 2006, Rene Brun wrote:
> >
> > > h[0] = new TH1F("h1", "h1", 10, 0, 10);
> > > h[0]->GetXaxis()->SetNdivisions(505);
> > >
> > > I strongly suggest to use the graphics editor to check quickly the

> > > best settings.
> >
> > Hi Rene,
> > thanks, now I finally understand how this Ndivisions is decomposed!
> > I was too stupid to understand (or too lazy while reading) the
documentation...
> >
> > But now I stumble over the fact that it is not done in the same way
> > for TGaxis as it is done for TAxis: For TGaxis I cannot switch off
> > the
> > optimisation: There is no bool as second argument for
> > TGaxis::SetNDivisions(..) and negative values seem to stop root.
> >
> > See the attached macro where I try to plot a TGaxis for an axis from

> > 0 to 180 with 6 main divisions (guess which quantity it is...)
> >
> > I tested on ROOT 4.04.02 and 5.10.00.
> >
> > Cheers
> >
> > Gero
> >
> > > On Fri, 26 May 2006, flucke_at_mail.desy.de wrote:
> > >
> > > > Dear ROOTers,
> > > > is there a way to control the number of axis values plotted?
> > > >
> > > > In the attached example I would like to have only the values 0,
> > > > 2, 4, 6,
> > > > 8 and 10 plotted next to the axis of the first histogram whose
> > > > axis ranges from 0 to 10. Having all integer values from 0 to 6
> > > > on an axis from 0 to 6 (second histogram) is fine.
> > > > As you can see, I found a small trick (third histogram), but
> > > > that does not solve my general problem that I sometimes want to
> > > > divide the umber of plotted lables by two.
> > > > I did not manage with TAxis->SetNdivisions(...) ...
> > > >
> > > > Cheers
> > > >
> > > > Gero
Received on Mon May 29 2006 - 18:18:12 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET