-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbasic_plot.py
More file actions
executable file
·35 lines (28 loc) · 855 Bytes
/
basic_plot.py
File metadata and controls
executable file
·35 lines (28 loc) · 855 Bytes
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
#!/usr/bin/env python3
'''
Run this file with
python3 examples/basic_plot.py
This script creates a simple, single-canvas plot with title text and a legend.
Notice the text and legend get placed automatically and do not overlap the data.
'''
import plot
import histograms
def basic_plot():
plot.plot(histograms.hists_mj_samples,
filename='basic_plot',
### Text ###
title='ATLAS Dummy',
subtitle='#sqrt{s}=13 TeV, 139 fb^{-1}',
legend=['Diboson', 'Single Top', 't#bar{t}', 'W+jets'],
ytitle='Events',
xtitle='m(J) [GeV]',
### Style ###
linecolor=plot.colors.tableu,
markersize=0,
### Range ###
x_range=[50, 250],
y_range=[0, None], # automatic top range
)
if __name__ == "__main__":
plot.save_transparent = False
basic_plot()