Hello guys!
I am currently want to plot some histograms together with their pulls. I created a canvas and two pad, and main histograms were draw on pad1 with option “E”, and I wanted to draw the pull plots in pad 2 with option “BAR”, however it seemed that the draw option on pad 2 can not be controlled and no matter what options I gave to it it still plotted with option “E”, quite confusing…
Well I generally have a lot of questions on the plotting control of ROOT when doing several plots on a single canvas, any tips on that?
{
TCanvas *c01 = new TCanvas("c01","",2400,2200);
c01->cd();
TPad *p01a = new TPad("p01a","p01a",0.1,0.30,0.9,1.0);
TPad *p01b = new TPad("p01b","p01b",0.1,0.1,0.9,0.315);
p01a->Draw();
p01b->Draw();
p01a->cd();
p01a->SetLogy();
xaxis1 = hist1_1->GetXaxis();
yaxis1 = hist1_1->GetYaxis();
xaxis1->SetTitle("pt_{#gamma} (GeV)");
yaxis1->SetTitle("Entries / 60 GeV");
yaxis1->SetTitleOffset(1.3);
yaxis1->SetRangeUser(0.01,1000000);
hist1_1->Draw("E");
p01b->cd();
p01b->SetTopMargin(0.037);
p01b->SetBottomMargin(0.5);
xaxis2 = pull->GetXaxis();
yaxis2 = pull->GetYaxis();
xaxis2->SetTitle("pt_{#gamma} (GeV)");
xaxis2->SetTitleOffset(1.25);
yaxis2->SetTitle("#frac{DATA-MC}{DATA}");
p01b->SetGrid();
pull->Draw("BAR");
}
Thanks in advance!
Best,Sebastian