CMS 3D CMS Logo

Functions
style Namespace Reference

Functions

def identification (config)
 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 (canvas, plot, config)
 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 def identification(config):
17  text = TPaveText(0.0, 0.95, 1.0, 1.0, "blNDC")
18  text.AddText(config.message)
19  text.SetBorderSize(0)
20  text.SetTextAlign(12)
21  text.SetTextSizePixels(10)
22  text.SetTextFont(82)
23  text.SetFillColor(0)
24  return text
25 
def identification(config)
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 def setgstyle():
51  # Zero horizontal error bars
52  gStyle.SetErrorX(0)
53 
54  # For the canvas
55  gStyle.SetCanvasBorderMode(0)
56  gStyle.SetCanvasColor(0)
57  gStyle.SetCanvasDefH(800) # Height of canvas
58  gStyle.SetCanvasDefW(800) # Width of canvas
59  gStyle.SetCanvasDefX(0) # Position on screen
60  gStyle.SetCanvasDefY(0)
61 
62  # For the frame
63  gStyle.SetFrameBorderMode(0)
64  gStyle.SetFrameBorderSize(1)
65  gStyle.SetFrameFillColor(1)
66  gStyle.SetFrameFillStyle(0)
67  gStyle.SetFrameLineColor(1)
68  gStyle.SetFrameLineStyle(0)
69  gStyle.SetFrameLineWidth(1)
70 
71  # For the Pad
72  gStyle.SetPadBorderMode(0)
73  gStyle.SetPadColor(0)
74  gStyle.SetPadGridX(False)
75  gStyle.SetPadGridY(False)
76  gStyle.SetGridColor(0)
77  gStyle.SetGridStyle(3)
78  gStyle.SetGridWidth(1)
79 
80  # Margins
81  gStyle.SetPadTopMargin(0.08)
82  gStyle.SetPadBottomMargin(0.19)
83  gStyle.SetPadLeftMargin(0.17)
84  #gStyle.SetPadRightMargin(0.07)
85 
86  # For the histo:
87  gStyle.SetHistLineColor(1)
88  gStyle.SetHistLineStyle(0)
89  gStyle.SetHistLineWidth(2)
90  gStyle.SetMarkerSize(1.4)
91  gStyle.SetEndErrorSize(4)
92 
93  # For the statistics box:
94  gStyle.SetOptStat(0)
95 
96  # For the axis
97  gStyle.SetAxisColor(1, "XYZ")
98  gStyle.SetTickLength(0.03, "XYZ")
99  gStyle.SetNdivisions(510, "XYZ")
100  gStyle.SetPadTickX(1)
101  gStyle.SetPadTickY(1)
102  gStyle.SetStripDecimals(False)
103 
104  # For the axis labels and titles
105  gStyle.SetTitleColor(1, "XYZ")
106  gStyle.SetLabelColor(1, "XYZ")
107  gStyle.SetLabelFont(42, "XYZ")
108  gStyle.SetLabelOffset(0.007, "XYZ")
109  gStyle.SetLabelSize(0.045, "XYZ")
110  gStyle.SetTitleFont(42, "XYZ")
111  gStyle.SetTitleSize(0.06, "XYZ")
112 
113  # For the legend
114  gStyle.SetLegendBorderSize(0)
115 
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 def setstatsize(canvas, plot, config):
32  # statistics size
33  gStyle.SetStatW(0.3)
34  gStyle.SetStatH(0.3)
35  plot.Draw()
36  canvas.Update()
37 
38  # set the size of the statistics box
39  stat = plot.FindObject("stats")
40  stat.SetX1NDC(1 - config.statboxsize)
41  stat.SetY1NDC(1 - config.statboxsize)
42 
43 
def setstatsize(canvas, plot, config)
statistics size
Definition: style.py:31