CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Style.py
Go to the documentation of this file.
1 #____________________________________________________________
2 #
3 # cuy
4 #
5 # A very simple way to make plots with ROOT via an XML file
6 #
7 # Francisco Yumiceva
8 # yumiceva@fnal.gov
9 #
10 # Fermilab, 2008
11 #
12 #____________________________________________________________
13 
14 import ROOT
15 
16 class Style:
17 
18  def SetStyle(self):
19 
20  ROOT.gStyle.SetFrameBorderMode(0)
21  ROOT.gStyle.SetCanvasBorderMode(0)
22  ROOT.gStyle.SetPadBorderMode(0)
23 
24  ROOT.gStyle.SetFrameFillColor(0)
25  ROOT.gStyle.SetPadColor(0)
26  ROOT.gStyle.SetCanvasColor(0)
27  ROOT.gStyle.SetTitleColor(1)
28  ROOT.gStyle.SetStatColor(0)
29 
30  # set the paper & margin sizes
31  ROOT.gStyle.SetPaperSize(20,26)
32  ROOT.gStyle.SetPadTopMargin(0.06)
33  ROOT.gStyle.SetPadRightMargin(0.04)
34  ROOT.gStyle.SetPadBottomMargin(0.14)
35  ROOT.gStyle.SetPadLeftMargin(0.16)
36  ROOT.gStyle.SetPadTickX(1)
37  ROOT.gStyle.SetPadTickY(1)
38 
39  ROOT.gStyle.SetTextFont(42) #132
40  ROOT.gStyle.SetTextSize(0.09)
41  ROOT.gStyle.SetLabelFont(42,"xyz")
42  ROOT.gStyle.SetTitleFont(42,"xyz")
43  ROOT.gStyle.SetLabelSize(0.045,"xyz") #0.035
44  ROOT.gStyle.SetTitleSize(0.045,"xyz")
45  ROOT.gStyle.SetTitleOffset(1.5,"y")
46 
47  # use bold lines and markers
48  ROOT.gStyle.SetMarkerStyle(8)
49  ROOT.gStyle.SetHistLineWidth(2)
50  ROOT.gStyle.SetLineWidth(1)
51  #ROOT.gStyle.SetLineStyleString(2,"[12 12]") // postscript dashes
52 
53  # do not display any of the standard histogram decorations
54  ROOT.gStyle.SetOptTitle(1)
55  ROOT.gStyle.SetOptStat(0) #("m")
56  ROOT.gStyle.SetOptFit(0)
57 
58  #ROOT.gStyle.SetPalette(1,0)
59  ROOT.gStyle.cd()
60  ROOT.gROOT.ForceStyle()
def SetStyle
Definition: Style.py:18