Hi,
I would like to get to know how to do the follwoing with the title and statistics boxes:
- Change the size of the font.
- Change the size of the box, like what you do with the legend box.
- 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.