Re: Q: Number of labels at an axis

Rene Brun (Rene.Brun@cern.ch)
Wed, 05 Mar 1997 17:51:55 +0100


Matthias Vitt wrote:
>
> I don't quite get the scheme how the number of labels that are printed
> on an axis is to be determined. The number of tick marks can be changed
> but that of course leads to an overlapping of the tick labels. Is there
> a way to draw fewer labels (or, maybe using just one decimal instead of
> two) to avoid this overlapping ?
>

The number of labels corresponds to the number of primary tick marks.
You can set the number of divisions on an axis (x,y,z) by clicking
on the axis and selecting "SetNdivisions"
or with statements like hist->GetXaxis()->SetNDivisions(ndiv)
where:
ndiv = N1 + 100*N2 + 10000*N3

N1=number of primary divisions
N2=number of secondary divisions
N3=number of tertiary divisions

if ndiv is positive, Root will try to optimize the number of divisions
around the specified values.
If you do not want this optimization, you can give a negative value
to ndiv.

You can see examples in TGaxis::PaintAxis
http://root.cern.ch/root/html/TGaxis.html

Rene Brun