-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode_for_plotting.txt
38 lines (32 loc) · 1021 Bytes
/
code_for_plotting.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// For the top plots - y axis label settings
h1->GetYaxis()->SetTitle("a.u.");
h1->GetYaxis()->SetLabelSize(0.07);
h1->GetYaxis()->SetLabelOffset(0.01);
h1->GetYaxis()->SetTitleSize(0.08);
h1->GetYaxis()->SetTitleOffset(0.81);
//For ratio plots
ratio->GetYaxis()->SetRangeUser(0,0.5);
ratio->GetYaxis()->SetTitle("2015/2016");
ratio->GetYaxis()->SetNdivisions(8);
ratio->GetXaxis()->SetLabelOffset(0.015);
ratio->GetXaxis()->SetTitleSize(0.125);
ratio->GetXaxis()->SetTitleOffset(1.15);
ratio->GetYaxis()->SetLabelSize(0.1);
ratio->GetYaxis()->SetLabelOffset(0.01);
ratio->GetYaxis()->SetTitleSize(0.12);
ratio->GetYaxis()->SetTitleOffset(0.25);
TCanvas *c1 = new TCanvas();
c1->Divide(1,2);
c1->SetBottomMargin(0.2);
c1->cd(1);
c1->GetPad(1)->SetLogy();
c1->GetPad(1)->SetPad(0.,0.25,1.,1);
c1->cd(2);
c1->GetPad(2)->SetPad(0.,0.05,1,0.365);
c1->GetPad(2)->SetBottomMargin(0.3);
c1->GetPad(2)->SetGridy(1);
//For legends
leg.SetLineColor(0);
leg.SetFillStyle(0);
leg.SetTextSize(0.04);
leg.SetShadowColor(0);