Re: number axis values plotted

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 26 May 2006 22:06:11 +0200 (MEST)


Hi Gero,

    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.

Rene Brun

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 Fri May 26 2006 - 22:06:16 MEST

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