CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
plotting.Frame Class Reference

Public Member Functions

def __init__ (self, pad, bounds, zmax, nrows, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None)
 
def adjustMarginLeft (self, adjust)
 
def adjustMarginRight (self, adjust)
 
def redrawAxis (self)
 
def setGridx (self, grid)
 
def setGridy (self, grid)
 
def setLogx (self, log)
 
def setLogy (self, log)
 
def setTitle (self, title)
 
def setXLabelSize (self, size)
 
def setXTitle (self, title)
 
def setXTitleOffset (self, offset)
 
def setXTitleSize (self, size)
 
def setYTitle (self, title)
 
def setYTitleOffset (self, offset)
 
def setYTitleSize (self, size)
 

Private Attributes

 _frame
 
 _pad
 

Detailed Description

Class for creating and managing a frame for a simple, one-pad plot

Definition at line 1239 of file plotting.py.

Constructor & Destructor Documentation

◆ __init__()

def plotting.Frame.__init__ (   self,
  pad,
  bounds,
  zmax,
  nrows,
  xbinlabels = None,
  xbinlabelsize = None,
  xbinlabeloption = None,
  ybinlabels = None 
)

Definition at line 1241 of file plotting.py.

1241  def __init__(self, pad, bounds, zmax, nrows, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None):
1242  self._pad = pad
1243  self._frame = _drawFrame(pad, bounds, zmax, xbinlabels, xbinlabelsize, xbinlabeloption, ybinlabels)
1244 
1245  yoffsetFactor = 1
1246  xoffsetFactor = 0
1247 
1248  self._frame.GetYaxis().SetTitleOffset(self._frame.GetYaxis().GetTitleOffset()*yoffsetFactor)
1249  self._frame.GetXaxis().SetTitleOffset(self._frame.GetXaxis().GetTitleOffset()*xoffsetFactor)
1250 
1251 
def _drawFrame(pad, bounds, zmax=None, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None, suffix="")
Definition: plotting.py:1187
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ adjustMarginLeft()

def plotting.Frame.adjustMarginLeft (   self,
  adjust 
)

Definition at line 1264 of file plotting.py.

References plotting.Frame._frame, plotting.Frame._pad, and hippyaddtobaddatafiles.cd().

1264  def adjustMarginLeft(self, adjust):
1265  self._pad.SetLeftMargin(self._pad.GetLeftMargin()+adjust)
1266  # Need to redraw frame after adjusting the margin
1267  self._pad.cd()
1268  self._frame.Draw("")
1269 

◆ adjustMarginRight()

def plotting.Frame.adjustMarginRight (   self,
  adjust 
)

Definition at line 1270 of file plotting.py.

References plotting.Frame._frame, plotting.Frame._pad, and hippyaddtobaddatafiles.cd().

1270  def adjustMarginRight(self, adjust):
1271  self._pad.SetRightMargin(self._pad.GetRightMargin()+adjust)
1272  # Need to redraw frame after adjusting the margin
1273  self._pad.cd()
1274  self._frame.Draw("")
1275 

◆ redrawAxis()

def plotting.Frame.redrawAxis (   self)

Definition at line 1300 of file plotting.py.

References plotting.Frame._pad.

1300  def redrawAxis(self):
1301  self._pad.RedrawAxis()
1302 

◆ setGridx()

def plotting.Frame.setGridx (   self,
  grid 
)

Definition at line 1258 of file plotting.py.

References plotting.Frame._pad.

1258  def setGridx(self, grid):
1259  self._pad.SetGridx(grid)
1260 

◆ setGridy()

def plotting.Frame.setGridy (   self,
  grid 
)

Definition at line 1261 of file plotting.py.

References plotting.Frame._pad.

1261  def setGridy(self, grid):
1262  self._pad.SetGridy(grid)
1263 

◆ setLogx()

def plotting.Frame.setLogx (   self,
  log 
)

Definition at line 1252 of file plotting.py.

References plotting.Frame._pad.

1252  def setLogx(self, log):
1253  self._pad.SetLogx(log)
1254 

◆ setLogy()

def plotting.Frame.setLogy (   self,
  log 
)

Definition at line 1255 of file plotting.py.

References plotting.Frame._pad.

1255  def setLogy(self, log):
1256  self._pad.SetLogy(log)
1257 

◆ setTitle()

def plotting.Frame.setTitle (   self,
  title 
)

Definition at line 1276 of file plotting.py.

References plotting.Frame._frame.

1276  def setTitle(self, title):
1277  self._frame.SetTitle(title)
1278 

◆ setXLabelSize()

def plotting.Frame.setXLabelSize (   self,
  size 
)

Definition at line 1288 of file plotting.py.

References plotting.Frame._frame.

1288  def setXLabelSize(self, size):
1289  self._frame.GetXaxis().SetLabelSize(size)
1290 

◆ setXTitle()

def plotting.Frame.setXTitle (   self,
  title 
)

Definition at line 1279 of file plotting.py.

References plotting.Frame._frame.

1279  def setXTitle(self, title):
1280  self._frame.GetXaxis().SetTitle(title)
1281 

◆ setXTitleOffset()

def plotting.Frame.setXTitleOffset (   self,
  offset 
)

Definition at line 1285 of file plotting.py.

References plotting.Frame._frame.

1285  def setXTitleOffset(self, offset):
1286  self._frame.GetXaxis().SetTitleOffset(offset)
1287 

◆ setXTitleSize()

def plotting.Frame.setXTitleSize (   self,
  size 
)

Definition at line 1282 of file plotting.py.

References plotting.Frame._frame.

1282  def setXTitleSize(self, size):
1283  self._frame.GetXaxis().SetTitleSize(size)
1284 

◆ setYTitle()

def plotting.Frame.setYTitle (   self,
  title 
)

Definition at line 1291 of file plotting.py.

References plotting.Frame._frame.

1291  def setYTitle(self, title):
1292  self._frame.GetYaxis().SetTitle(title)
1293 

◆ setYTitleOffset()

def plotting.Frame.setYTitleOffset (   self,
  offset 
)

Definition at line 1297 of file plotting.py.

References plotting.Frame._frame.

1297  def setYTitleOffset(self, offset):
1298  self._frame.GetYaxis().SetTitleOffset(offset)
1299 

◆ setYTitleSize()

def plotting.Frame.setYTitleSize (   self,
  size 
)

Definition at line 1294 of file plotting.py.

References plotting.Frame._frame.

1294  def setYTitleSize(self, size):
1295  self._frame.GetYaxis().SetTitleSize(size)
1296 

Member Data Documentation

◆ _frame

plotting.Frame._frame
private

◆ _pad

plotting.Frame._pad
private