Total tick control


I have two beefs about axis tick control in ROOT:

  1. I cannot for the life of me get the number of divisions and labeling that I want with the controls that I know about

  2. The ROOT documentation for SetNdivisions does not adequately describe the n1,n2,n3 variables. It only calls them “primary”, “secondary”, etc. without saying what it is they are dividing. If I set n2=4, is that dividing the primary interval or the whole axis? It should state: n1 divides the whole axis, n2 divides the primary interval, and n3 divides the secondary interval, if such is the case.

Regarding the first point:
If I set optimization to true, it doesn’t just optimize, it totally ignores my input. I don’t want divisions of 5 or 10 if I’m graphing something that has natural divisions elsewhere, like “4”. (In my case, I would like to put ticks and tick labels at +/- 1, 5, 9, 13, 17, … and no tick at 0.)

But if I turn optimization off, it insists on putting labels at the bin edge at the end of the axis, and my bins are centered on the integer value (i.e., bin edges are J-0.5, J+0.5). And then all my tick labels are horrible floating point numbers that have no basis in what I’m plotting.

I’m hoping that I’m woefully ignorant of other controls in ROOT that give me more flexibility in placing ticks and tick labels wherever I want, but right now in the documentation I’m not seeing it.

Are there any other tricks that the experts know about?

Thanks for any help you can provide,
-Phil D.

Could you send the shortest possible RUNNING script showing your problem?
Manual control of ticks has always proven to be a bad idea, this should be automatic and we would like to understand why the auto algorithm does not work in your case.