[ROOT] Customizing axis

From: Alexander Wagner (a.wagner@physik.uni-wuerzburg.de)
Date: Tue Aug 19 2003 - 14:07:16 MEST


Hi!

Don't know but maybe I'm just overlooking something obvious.
But as I'm searching for some hours now, maybe it's time to
"ask a human". :)

Consider several TGraph objects. In my plot I draw them in
one graph using

		gr1->Draw("AC");
		gr2->Draw("C");
		gr3->Draw("C");

This works fine, but now I want to adjust the axis. E.g. I
want the y-axis to use exponetials, that is labels 1, 1.5,
2, 2.5 and so on and on top "x 10^-3" something like that.
If I get the docs correctly a TGraph creates a
TGaxis-Object for the axis and looking at TGaxis I see that
I should use SetMaxDigits() to achieve this.

Now I tried something like

gr1->GetXaxis()->SetMaxDigits(2);

But this doesn't work as on a closer look at GetXaxis I see
that it returns the TAxis and not the TGaxis. As far as I
can see I've no access to the the methods like
SetMaxDigits(). How would I set this values then? TAxis is
somewhat limited compared to TGaxis. Now if I got it
correctly TAxis uses TGaxis for drawing. So I should have
access to the members of TGaxis. Not? How?

Thanks for any help or work arround in advance!

-- 

Kind regards,                /                 War is Peace.
                            |            Freedom is Slavery.
Alexander Wagner            |         Ignorance is Strength.
----------------------------|
Theoretische Physik II      | Theory     : G. Orwell, "1984"
Universitaet Wuerzburg     /  In practice:   USA, since 2001



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET