Re: axis title alignment

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Tue, 22 Nov 2005 09:22:20 +0100 (CET)

Hello,

 Yes I know. But there no way, right now, to do that. The axis title position is either right align or centered. As you see the function used to place the axis title is CenterTitle() which can be true or false. False means "right". Internally the title position is stored as a single bit so there is no room (yet) to store the "left" alignment. But it can be done. The only workaround I can offer you with the current root version is to draw the text title yourself using TLatex.

Cheers, Olivier

On Tue, 22 Nov 2005, OKUMURA, Akira wrote:

> Hello Olivier,
>
> > Graph1->GetXaxis()->CenterTitle(true);
> Yes. It works.
> But I would like to put a title on the LEFT.
>
> Thank you
>
> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
> Institute for Cosmic Ray Research, University of Tokyo
> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
> Phone/Fax : +81 4-7136-3153
> Skype : okumura.akira
>
> On 2005/11/21, at 22:34, Olivier Couet wrote:
>
> >
> > Hi,
> >
> > Let's assume you have a graph Graph1. You can do:
> >
> > Graph1->GetXaxis()->SetTitle("X title");
> >
> > By default the title is displayed at the right of the axis.
> > You can center it with:
> >
> > Graph1->GetXaxis()->CenterTitle(true);
> >
> > You can do the same with histograms.
> >
> > O.Couet
> >
> > On Sat, 19 Nov 2005, OKUMURA, Akira wrote:
> >
> > > Hello ROOTers,
> > >
> > > I would like to align an axis title at the left end of the axis.
> > > Like 'atitle "x" "y" "z" 111' in PAW.
> > >
> > > It may be one of FAQ, but I could not find an answer with Google.
> > >
> > > Thank you in advance.
> > >
> > > OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
> > > Institute for Cosmic Ray Research, University of Tokyo
> > > 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
> > > Phone/Fax : +81 4-7136-3153
> > > Skype : okumura.akira
> > >
> > >
> >
> > -- Org: CERN - European Laboratory for Particle Physics.
> > Mail: 1211 Geneve 23 - Switzerland Mailbox: J25910
> > E-Mail: Olivier.Couet_at_cern.ch Phone: +41 22
> > 7676522
> > WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22
> > 7670300
> >
> >
>
>

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet_at_cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7670300
Received on Tue Nov 22 2005 - 09:22:28 MET

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