4/09/2010

Set X axis label

TH1I* particleDistr= new TH1I("particleDistr", "", 13, 1, 14);
  particleDistr->GetXaxis()->SetLabelSize(0.08);
 
  particleDistr->GetXaxis()->SetBinLabel(1,"#gamma");
  particleDistr->GetXaxis()->SetBinLabel(2,"e^{+}");
  particleDistr->GetXaxis()->SetBinLabel(3,"e^{-}");
  particleDistr->GetXaxis()->SetBinLabel(4,"#mu^{+}");
  particleDistr->GetXaxis()->SetBinLabel(5,"#mu^{-}");
  particleDistr->GetXaxis()->SetBinLabel(6,"#tau^{+}");
  particleDistr->GetXaxis()->SetBinLabel(7,"#tau^{-}");
  particleDistr->GetXaxis()->SetBinLabel(8,"#pi^{0}");
  particleDistr->GetXaxis()->SetBinLabel(9,"#pi^{+}");
  particleDistr->GetXaxis()->SetBinLabel(10,"#pi^{-}");
  particleDistr->GetXaxis()->SetBinLabel(11,"n");
  particleDistr->GetXaxis()->SetBinLabel(12,"p^{#pm}");
  particleDistr->GetXaxis()->SetBinLabel(13,"?");     
 
  fTracesObjects->Add(particleDistr);

没有评论: