[ROOT] TGaxis Font

From: Claire Gwenlan (cg@hep.ucl.ac.uk)
Date: Fri Aug 23 2002 - 15:01:03 MEST


Hi,

Is it actually possible to change the text font (and size) in TGaxis. I've
created an axis, but would like the font in times-bold and I can't seem to
get it to work. So, I have, for example...


blah blah.....

    TGaxis *VerticalAxis = new 
 TGaxis(Data[i]->GetBinCenter(1)-0.5*Data[i]->GetBinWidth(1),log10(Data[i]->GetMinimum()),
         Data[i]->GetBinCenter(1)-0.5*Data[i]->GetBinWidth(1),
 log10(Data[i]->GetMaximum()),Data[i]->GetMinimum(),Data[i]->GetMaximum(),50510,"G"); 
    VerticalAxis->SetName("VerticalAxis"); 
    VerticalAxis->SetLineColor(kRed); 
    VerticalAxis->SetTextColor(kRed); 
    VerticalAxis->SetTextFont(22); 
    VerticalAxis->SetTextSize(0.1); 

    VerticalAxis->Draw(); 

blah blah....


and I get the attached plot, so nothing about the font ever seems to
change.

Cheers,

Claire





This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:05 MET