Font and box sizes

Hi,
I would like to get to know how to do the follwoing with the title and statistics boxes:

  1. Change the size of the font.
  2. Change the size of the box, like what you do with the legend box.
  3. Change the location of the box.

I would also like to learn how to change the font size of the axes titles.
The Code I am trying to modify is here:

{
TCanvas *hX2Fit = new TCanvas (“hX2Fit”,"X2 for gamma and proton, Fit Core ",1);

hX2Fit->Divide(1,2);
hX2Fit->cd(1);
hX2p_1->SetTitle(“X2 for 0 <= Fit Core <= 20”);
hX2p_1->Draw();
hX2p_1->SetLineColor(kRed);
hX2p_1->GetXaxis()->SetTitle(“X2”);
hX2g_1->Draw(“Same”);
hX2g_1->SetLineColor(kBlue);
gPad->SetFillColor(10);// This will set the fill color of the active pad only

TLegend *legend = new TLegend(0.78,0.70,0.98,0.82);
legend->SetFillColor(kWhite);
legend->AddEntry(“hX2p_1”,“protons”,“l”);
legend->AddEntry(“hX2g_1”,“Gammas”,“l”);
legend->SetTextSize(0.05);
legend->Draw();

hX2Fit->cd(2);
hX2p_2->SetTitle(“X2 for 20 < Fit Core <= 40”);
hX2p_2->Draw();
hX2p_2->SetLineColor(kRed);
hX2p_2->GetXaxis()->SetTitle(“X2”);
hX2g_2->Draw(“Same”);
hX2g_2->SetLineColor(kBlue);
gPad->SetFillColor(10);

TLegend *legend = new TLegend(0.78,0.70,0.98,0.82);
legend->SetFillColor(kWhite);
legend->AddEntry(“hX2p_2”,“protons”,“l”);
legend->AddEntry(“hX2g_2”,“Gammas”,“l”);
legend->SetTextSize(0.05);
legend->Draw();

}

Thanks in advance.
:laughing:

see class TStyle:
void SetStatBorderSize(Width_t size = 2)
void SetStatColor(Int_t color = 19)
void SetStatFont(Style_t font = 62)
void SetStatFontSize(Float_t size = 0)
void SetStatFormat(const char* format = “6.4g”)
void SetStatH(Float_t h = 0.1)
void SetStatStyle(Style_t style = 1001)
void SetStatTextColor(Int_t color = 1)
void SetStatW(Float_t w = 0.19)
void SetStatX(Float_t x = 0)
void SetStatY(Float_t y = 0)

see also: root.cern.ch/root/htmldoc/THistP … nter:Paint
look at section “Statistics Display”

Rene