Re: number axis values plotted

From: <flucke_at_mail.desy.de>
Date: Mon, 29 May 2006 18:11:16 +0200 (CEST)


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:11:21 MEST

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