test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
style Namespace Reference

Functions

def identification
 creates the identification text in the top left corner More...
 
def setgstyle
 set gstyle by https://github.com/mschrode/AwesomePlots/blob/master/Style.cc More...
 
def setstatsize
 statistics size More...
 

Function Documentation

def style.identification (   config)

creates the identification text in the top left corner

Definition at line 16 of file style.py.

Referenced by bigStructure.plot(), subModule.plot(), timeStructure.plot(), and bigModule.plot().

16 
17 def identification(config):
18  text = TPaveText(0.0, 0.95, 1.0, 1.0, "blNDC")
19  text.AddText(config.message)
20  text.SetBorderSize(0)
21  text.SetTextAlign(12)
22  text.SetTextSizePixels(10)
23  text.SetTextFont(82)
24  text.SetFillColor(0)
25  return text
def identification
creates the identification text in the top left corner
Definition: style.py:16
def style.setgstyle ( )

set gstyle by https://github.com/mschrode/AwesomePlots/blob/master/Style.cc

Definition at line 50 of file style.py.

Referenced by mps_validate.main().

50 
51 def setgstyle():
52  # Zero horizontal error bars
53  gStyle.SetErrorX(0)
54 
55  # For the canvas
56  gStyle.SetCanvasBorderMode(0)
57  gStyle.SetCanvasColor(0)
58  gStyle.SetCanvasDefH(800) # Height of canvas
59  gStyle.SetCanvasDefW(800) # Width of canvas
60  gStyle.SetCanvasDefX(0) # Position on screen
61  gStyle.SetCanvasDefY(0)
62 
63  # For the frame
64  gStyle.SetFrameBorderMode(0)
65  gStyle.SetFrameBorderSize(1)
66  gStyle.SetFrameFillColor(1)
67  gStyle.SetFrameFillStyle(0)
68  gStyle.SetFrameLineColor(1)
69  gStyle.SetFrameLineStyle(0)
70  gStyle.SetFrameLineWidth(1)
71 
72  # For the Pad
73  gStyle.SetPadBorderMode(0)
74  gStyle.SetPadColor(0)
75  gStyle.SetPadGridX(False)
76  gStyle.SetPadGridY(False)
77  gStyle.SetGridColor(0)
78  gStyle.SetGridStyle(3)
79  gStyle.SetGridWidth(1)
80 
81  # Margins
82  gStyle.SetPadTopMargin(0.08)
83  gStyle.SetPadBottomMargin(0.19)
84  gStyle.SetPadLeftMargin(0.17)
85  #gStyle.SetPadRightMargin(0.07)
86 
87  # For the histo:
88  gStyle.SetHistLineColor(1)
89  gStyle.SetHistLineStyle(0)
90  gStyle.SetHistLineWidth(2)
91  gStyle.SetMarkerSize(1.4)
92  gStyle.SetEndErrorSize(4)
93 
94  # For the statistics box:
95  gStyle.SetOptStat(0)
96 
97  # For the axis
98  gStyle.SetAxisColor(1, "XYZ")
99  gStyle.SetTickLength(0.03, "XYZ")
100  gStyle.SetNdivisions(510, "XYZ")
101  gStyle.SetPadTickX(1)
102  gStyle.SetPadTickY(1)
103  gStyle.SetStripDecimals(False)
104 
105  # For the axis labels and titles
106  gStyle.SetTitleColor(1, "XYZ")
107  gStyle.SetLabelColor(1, "XYZ")
108  gStyle.SetLabelFont(42, "XYZ")
109  gStyle.SetLabelOffset(0.007, "XYZ")
110  gStyle.SetLabelSize(0.045, "XYZ")
111  gStyle.SetTitleFont(42, "XYZ")
112  gStyle.SetTitleSize(0.06, "XYZ")
113 
114  # For the legend
115  gStyle.SetLegendBorderSize(0)
def setgstyle
set gstyle by https://github.com/mschrode/AwesomePlots/blob/master/Style.cc
Definition: style.py:50
def style.setstatsize (   canvas,
  plot,
  config 
)

statistics size

Definition at line 31 of file style.py.

Referenced by monitorPlot.plot(), and bigModule.plot().

31 
32 def setstatsize(canvas, plot, config):
33  # statistics size
34  gStyle.SetStatW(0.3)
35  gStyle.SetStatH(0.3)
36  plot.Draw()
37  canvas.Update()
38 
39  # set the size of the statistics box
40  stat = plot.FindObject("stats")
41  stat.SetX1NDC(1 - config.statboxsize)
42  stat.SetY1NDC(1 - config.statboxsize)
43 
def setstatsize
statistics size
Definition: style.py:31