Hi there,
I’m trying to left align my y-axis labels since I have several powers of 10.
I’d like to get all the “1” vertically aligned (see plot below obtained with the following code)
TH1D* histo = new TH1D ("histo","histo",100,-10,10) ;
histo->FillRandom("gaus",1e5) ;
histo->SetMinimum(1e-10) ; histo->SetMaximum(1e10) ;
TCanvas *canvas = new TCanvas ("canvas","canvas",0,0,1000,618) ; gPad->SetLogy() ;
histo->Draw() ;
As I understand it, it should be possible using histo->GetYaxis()->LabelsOption(“d”) ;
http://root.cern.ch/phpBB2/viewtopic.php?t=6734&highlight=label+alignment & http://root.cern.ch/root/html520/src/TAxis.cxx.html#mcl1cE
But I don’t manage to do it. Could you please tell me how to proceed?
Thanks in advance,
Z