-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtiered_plot.py
More file actions
executable file
·46 lines (36 loc) · 1.27 KB
/
tiered_plot.py
File metadata and controls
executable file
·46 lines (36 loc) · 1.27 KB
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
#!/usr/bin/env python3
'''
Run this file with
python3 examples/tiered_plot.py
This script showcases plot.plot_tiered(), which plots multiple histograms in several
top-to-bottom tiers. This plot style is useful for comparing multiple distribution
shapes without crowding the plot, at the cost of obscuring the normalizations.
'''
import plot
import histograms
import ROOT
def tiered_plot():
hists = histograms.hists_ptV_tiered_mVV_SMvEFT
hists = [[hists[i], hists[i+1]] for i in range(0, len(hists), 2)]
args = {
'filename': 'tiered_plot',
'title': 'ATLAS Dummy',
'subtitle': '#sqrt{s}=13 TeV, 139 fb^{-1}',
'legend': ['SM Diboson', 'EFT c_{W}^{2}'],
'xtitle': 'p_{T}(V) [GeV]',
'ytitle': 'Normalized Events',
'tier_title': 'm(VV) [GeV]',
'tier_labels': make_bins([0, 200, 500, 800, 1200, 2000, 3000]),
'linecolor': plot.colors.tableu,
'x_range': [0, 2000],
'xdivs': 506,
}
plot.plot_tiered(hists, **args)
def make_bins(vals):
out = []
for i in range(len(vals) - 1):
out.append('{},{}'.format(vals[i], vals[i+1]))
return out
if __name__ == "__main__":
plot.save_transparent = False
tiered_plot()