Axis labeling

From: Alexander Wagner <a.wagner_at_physik.uni-wuerzburg.de>
Date: Fri, 15 Jul 2005 12:39:48 +0200


Hi!

Maybe it is a very simple question with an obvious answer that I just wasn't able to find...

Consider a TGraph, Histogram or wathever. Now I want to lable the axis with numbers, what root does by default. But to get it more readable I want less numbers displayed but the tickmarks should be there. Ie. from root I get somthing like this:

|------|-----|-----|-----|-----|-----|-----|----|
 1 2 3 4 5 6 7 8 9

And I want something like this

|------|-----|-----|-----|-----|-----|-----|----|

        2 4 6 8

Searching through TAxis and TAttAxis I came up with no solution so far. A hard work arround would be to lable every bin explicitly using SetBinLabel().

(The "advanced version" of the problem would be someting like "lable 2, 5, 5.5, 8...")

Is there an easy solution I just missed?

TIA!

-- 

Kind regards,                /                 War is Peace.
                            |            Freedom is Slavery.
Alexander Wagner            |         Ignorance is Strength.
                            |
                            | Theory     : G. Orwell, "1984"
                           /  In practice:   USA, since 2001
Received on Fri Jul 15 2005 - 12:39:54 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET