ATLAS Offline Software
Loading...
Searching...
No Matches
style.py
Go to the documentation of this file.
1# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2
3#
4# $Id: style.py,v 1.1 2005-05-11 19:47:29 ssnyder Exp $
5# File: style.py
6# Created: sss, 2004.
7# Purpose: Centralize style settings for root plots.
8#
9
10"""Centralize style settings for root plots.
11"""
12
13import ROOT
14
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