-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStyle.h
60 lines (50 loc) · 1.51 KB
/
Style.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <TH1.h>
#include <TPad.h>
#include <TStyle.h>
#include <string>
TH1 *htmp;
TLegendEntry *le;
void SetStyle(){
gStyle->SetOptStat(0);
gStyle->SetPadTickX(1);
gStyle->SetPadTickY(1);
gStyle->SetLegendFont(43);
gStyle->SetLegendTextSize(18);
}
void SetPadStyle(bool log = false){
gPad->SetLeftMargin(0.18);
if ( log ){
gPad->SetRightMargin(0.12);
}else{
gPad->SetRightMargin(0.04);
}
gPad->SetTopMargin(0.05);
gPad->SetBottomMargin(0.14);
gStyle->SetLegendBorderSize(0);
gStyle->SetLegendFillColor(0);
return;
}
void SetHistoStyle(std::string xtitle="", std::string ytitle="", std::string ztitle="",float size_title=22, float size_label=18){
htmp->SetTitleFont(62);
htmp->GetYaxis()->SetLabelFont(63);
htmp->GetYaxis()->SetTitleFont(63);
htmp->GetYaxis()->SetTitleOffset(1.25);
htmp->GetYaxis()->SetLabelSize(size_label);
htmp->GetYaxis()->SetTitleSize(size_title);
htmp->GetYaxis()->SetTitle(ytitle.c_str());
htmp->GetYaxis()->SetNdivisions(9,5,0);
htmp->GetXaxis()->SetLabelFont(63);
htmp->GetXaxis()->SetTitleFont(63);
htmp->GetXaxis()->SetTitleOffset(1.0);
htmp->GetXaxis()->SetLabelSize(size_label);
htmp->GetXaxis()->SetTitleSize(size_title);
htmp->GetXaxis()->SetTitle(xtitle.c_str());
htmp->GetXaxis()->SetNdivisions(9,2,0);
htmp->GetZaxis()->SetLabelFont(63);
htmp->GetZaxis()->SetTitleFont(63);
htmp->GetZaxis()->SetTitleOffset(1.0);
htmp->GetZaxis()->SetLabelSize(size_label);
htmp->GetZaxis()->SetTitleSize(size_title);
htmp->GetZaxis()->SetTitle(ztitle.c_str());
return;
}