ATLAS Offline Software
Loading...
Searching...
No Matches
python.style Namespace Reference

Functions

 style ()

Detailed Description

Centralize style settings for root plots.

Function Documentation

◆ style()

python.style.style ( )
Make a standard set of Root plot style settings.

Definition at line 15 of file style.py.

15def style():
16 """Make a standard set of Root plot style settings."""
17 s = ROOT.gStyle
18
19 # Graphics style parameters to avoid gray background on figures
20 s.SetCanvasColor(10)
21 s.SetStatColor(10)
22 #s.SetTitleColor(10)
23 s.SetPadColor(10)
24 s.SetPaperSize(20,24)
25 s.SetStatFont(42)
26 s.SetOptStat (1110)
27
28 # title size
29 s.SetOptFit(111)
30 s.SetTitleFont(42)
31 s.SetTitleH(0.09)
32 s.SetTitleX(0.1)
33
34 # Turn on date stamp.
35 s.SetOptDate (1)
36
37 # histogram style
38 s.SetHistLineWidth (3)
39 s.SetHistLineColor (1)
40 s.SetFrameLineWidth (3)
41 s.SetFrameLineColor (1)
42 s.SetLabelSize(0.05, "xyz")
43 s.SetTitleOffset(1.2, "xyz")
44
45 # root Defaults
46 s.SetPadLeftMargin (0.1)
47 s.SetErrorX (0.5)
48
49 return
50
51