CMS 3D CMS Logo

Classes | Functions | Variables
plotting Namespace Reference

Classes

class  AggregateBins
 
class  AggregateHistos
 
class  CutEfficiency
 
class  DQMSubFolder
 
class  FakeDuplicate
 
class  Frame
 
class  FrameRatio
 
class  FrameTGraph2D
 
class  GetDirectoryCode
 
class  Plot
 
class  PlotEmpty
 
class  PlotFolder
 
class  PlotGroup
 
class  PlotOnSideGroup
 
class  Plotter
 
class  PlotterFolder
 
class  PlotterInstance
 
class  PlotterItem
 
class  PlotterTableItem
 
class  PlotText
 
class  PlotTextBox
 
class  ROC
 
class  Subtract
 
class  Transform
 

Functions

def _calculateRatios (histos, ratioUncertainty=False)
 
def _copyStyle (src, dst)
 
def _createCanvas (name, width, height)
 
def _drawFrame (pad, bounds, zmax=None, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None, suffix="")
 
def _findBounds (th1s, ylog, xmin=None, xmax=None, ymin=None, ymax=None)
 
def _findBoundsY (th1s, ylog, ymin=None, ymax=None, coverage=None, coverageRange=None)
 
def _getDirectory (args, kwargs)
 
def _getDirectoryDetailed (tfile, possibleDirs, subDir=None)
 
def _getObject (tdirectory, name)
 
def _getOrCreateObject (tdirectory, nameOrCreator)
 
def _getXmax (obj, limitToNonZeroContent=False)
 
def _getXmin (obj, limitToNonZeroContent=False)
 
def _getYmax (obj, limitToNonZeroContent=False)
 
def _getYmaxWithError (th1)
 
def _getYmin (obj, limitToNonZeroContent=False)
 
def _getYminIgnoreOutlier (th1)
 
def _getYminMaxAroundMedian (obj, coverage, coverageRange=None)
 
def _mergeBinLabels (labelsAll)
 
def _mergeBinLabelsX (histos)
 
def _mergeBinLabelsY (histos)
 
def _modifyPadForRatio (pad, ratioFactor)
 
def _setStyle ()
 
def _th1IncludeOnlyBins (histos, xbinlabels)
 
def _th1RemoveEmptyBins (histos, xbinlabels)
 
def _th1ToOrderedDict (th1, renameBin=None)
 
def _th2RemoveEmptyBins (histos, xbinlabels, ybinlabels)
 

Variables

 _gr
 
 _plotStylesColor
 
 _plotStylesMarker
 
 _ratio
 
 _ratioYTitle
 
 _th1
 
 _uncertainty
 
 _xerrshigh
 
 _xerrslow
 
 _xvalues
 
 _yerrshigh
 
 _yerrslow
 
 _yvalues
 
 IgnoreCommandLineOptions
 
 verbose
 

Function Documentation

def plotting._calculateRatios (   histos,
  ratioUncertainty = False 
)
private
Calculate the ratios for a list of histograms

Definition at line 146 of file plotting.py.

References funct.abs(), cond::serialization.equal(), and SiStripPI.max.

Referenced by ntuplePlotting.drawSingle().

146 def _calculateRatios(histos, ratioUncertainty=False):
147  """Calculate the ratios for a list of histograms"""
148 
149  def _divideOrZero(numerator, denominator):
150  if denominator == 0:
151  return 0
152  return numerator/denominator
153 
154  def equal(a, b):
155  if a == 0. and b == 0.:
156  return True
157  return abs(a-b)/max(abs(a),abs(b)) < 1e-3
158 
159  def findBins(wrap, bins_xvalues):
160  ret = []
161  currBin = wrap.begin()
162  i = 0
163  while i < len(bins_xvalues) and currBin < wrap.end():
164  (xcenter, xlow, xhigh) = bins_xvalues[i]
165  xlowEdge = xcenter-xlow
166  xupEdge = xcenter+xhigh
167 
168  (curr_center, curr_low, curr_high) = wrap.xvalues(currBin)
169  curr_lowEdge = curr_center-curr_low
170  curr_upEdge = curr_center+curr_high
171 
172  if equal(xlowEdge, curr_lowEdge) and equal(xupEdge, curr_upEdge):
173  ret.append(currBin)
174  currBin += 1
175  i += 1
176  elif curr_upEdge <= xlowEdge:
177  currBin += 1
178  elif curr_lowEdge >= xupEdge:
179  ret.append(None)
180  i += 1
181  else:
182  ret.append(None)
183  currBin += 1
184  i += 1
185  if len(ret) != len(bins_xvalues):
186  ret.extend([None]*( len(bins_xvalues) - len(ret) ))
187  return ret
188 
189  # Define wrappers for TH1/TGraph/TGraph2D to have uniform interface
190  # TODO: having more global wrappers would make some things simpler also elsewhere in the code
191  class WrapTH1:
192  def __init__(self, th1, uncertainty):
193  self._th1 = th1
194  self._uncertainty = uncertainty
195 
196  xaxis = th1.GetXaxis()
197  xaxis_arr = xaxis.GetXbins()
198  if xaxis_arr.GetSize() > 0: # unequal binning
199  lst = [xaxis_arr[i] for i in xrange(0, xaxis_arr.GetSize())]
200  arr = array.array("d", lst)
201  self._ratio = ROOT.TH1F("foo", "foo", xaxis.GetNbins(), arr)
202  else:
203  self._ratio = ROOT.TH1F("foo", "foo", xaxis.GetNbins(), xaxis.GetXmin(), xaxis.GetXmax())
204  _copyStyle(th1, self._ratio)
205  self._ratio.SetStats(0)
206  self._ratio.SetLineColor(ROOT.kBlack)
207  self._ratio.SetLineWidth(1)
208  def draw(self, style=None):
209  st = style
210  if st is None:
211  if self._uncertainty:
212  st = "EP"
213  else:
214  st = "HIST P"
215  self._ratio.Draw("same "+st)
216  def begin(self):
217  return 1
218  def end(self):
219  return self._th1.GetNbinsX()+1
220  def xvalues(self, bin):
221  xval = self._th1.GetBinCenter(bin)
222  xlow = xval-self._th1.GetXaxis().GetBinLowEdge(bin)
223  xhigh = self._th1.GetXaxis().GetBinUpEdge(bin)-xval
224  return (xval, xlow, xhigh)
225  def yvalues(self, bin):
226  yval = self._th1.GetBinContent(bin)
227  yerr = self._th1.GetBinError(bin)
228  return (yval, yerr, yerr)
229  def y(self, bin):
230  return self._th1.GetBinContent(bin)
231  def divide(self, bin, scale):
232  self._ratio.SetBinContent(bin, _divideOrZero(self._th1.GetBinContent(bin), scale))
233  self._ratio.SetBinError(bin, _divideOrZero(self._th1.GetBinError(bin), scale))
234  def makeRatio(self):
235  pass
236  def getRatio(self):
237  return self._ratio
238 
239  class WrapTGraph:
240  def __init__(self, gr, uncertainty):
241  self._gr = gr
242  self._uncertainty = uncertainty
243  self._xvalues = []
244  self._xerrslow = []
245  self._xerrshigh = []
246  self._yvalues = []
247  self._yerrshigh = []
248  self._yerrslow = []
249  def draw(self, style=None):
250  if self._ratio is None:
251  return
252  st = style
253  if st is None:
254  if self._uncertainty:
255  st = "PZ"
256  else:
257  st = "PX"
258  self._ratio.Draw("same "+st)
259  def begin(self):
260  return 0
261  def end(self):
262  return self._gr.GetN()
263  def xvalues(self, bin):
264  return (self._gr.GetX()[bin], self._gr.GetErrorXlow(bin), self._gr.GetErrorXhigh(bin))
265  def yvalues(self, bin):
266  return (self._gr.GetY()[bin], self._gr.GetErrorYlow(bin), self._gr.GetErrorYhigh(bin))
267  def y(self, bin):
268  return self._gr.GetY()[bin]
269  def divide(self, bin, scale):
270  # Ignore bin if denominator is zero
271  if scale == 0:
272  return
273  # No more items in the numerator
274  if bin >= self._gr.GetN():
275  return
276  # denominator is missing an item
277  xvals = self.xvalues(bin)
278  xval = xvals[0]
279 
280  self._xvalues.append(xval)
281  self._xerrslow.append(xvals[1])
282  self._xerrshigh.append(xvals[2])
283  yvals = self.yvalues(bin)
284  self._yvalues.append(yvals[0] / scale)
285  if self._uncertainty:
286  self._yerrslow.append(yvals[1] / scale)
287  self._yerrshigh.append(yvals[2] / scale)
288  else:
289  self._yerrslow.append(0)
290  self._yerrshigh.append(0)
291  def makeRatio(self):
292  if len(self._xvalues) == 0:
293  self._ratio = None
294  return
295  self._ratio = ROOT.TGraphAsymmErrors(len(self._xvalues), array.array("d", self._xvalues), array.array("d", self._yvalues),
296  array.array("d", self._xerrslow), array.array("d", self._xerrshigh),
297  array.array("d", self._yerrslow), array.array("d", self._yerrshigh))
298  _copyStyle(self._gr, self._ratio)
299  def getRatio(self):
300  return self._ratio
301  class WrapTGraph2D(WrapTGraph):
302  def __init__(self, gr, uncertainty):
303  WrapTGraph.__init__(self, gr, uncertainty)
304  def xvalues(self, bin):
305  return (self._gr.GetX()[bin], self._gr.GetErrorX(bin), self._gr.GetErrorX(bin))
306  def yvalues(self, bin):
307  return (self._gr.GetY()[bin], self._gr.GetErrorY(bin), self._gr.GetErrorY(bin))
308 
309  def wrap(o):
310  if isinstance(o, ROOT.TH1):
311  return WrapTH1(o, ratioUncertainty)
312  elif isinstance(o, ROOT.TGraph):
313  return WrapTGraph(o, ratioUncertainty)
314  elif isinstance(o, ROOT.TGraph2D):
315  return WrapTGraph2D(o, ratioUncertainty)
316 
317  wrappers = [wrap(h) for h in histos]
318  ref = wrappers[0]
319 
320  wrappers_bins = []
321  ref_bins = [ref.xvalues(b) for b in xrange(ref.begin(), ref.end())]
322  for w in wrappers:
323  wrappers_bins.append(findBins(w, ref_bins))
324 
325  for i, bin in enumerate(xrange(ref.begin(), ref.end())):
326  (scale, ylow, yhigh) = ref.yvalues(bin)
327  for w, bins in zip(wrappers, wrappers_bins):
328  if bins[i] is None:
329  continue
330  w.divide(bins[i], scale)
331 
332  for w in wrappers:
333  w.makeRatio()
334 
335  return wrappers
336 
337 
def _copyStyle(src, dst)
Definition: plotting.py:1659
bool equal(const T &first, const T &second)
Definition: Equal.h:34
def _calculateRatios(histos, ratioUncertainty=False)
Definition: plotting.py:146
def draw(name, histos, styles=_defaultStyles, legendLabels=[], kwargs)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define end
Definition: vmac.h:39
void divide(MonitorElement *eff, const MonitorElement *numerator, const MonitorElement *denominator)
Function to fill an efficiency histograms with binomial errors.
Definition: Histograms.h:23
#define begin
Definition: vmac.h:32
auto wrap(F iFunc) -> decltype(iFunc())
def plotting._copyStyle (   src,
  dst 
)
private

Definition at line 1659 of file plotting.py.

1659 def _copyStyle(src, dst):
1660  properties = []
1661  if hasattr(src, "GetLineColor") and hasattr(dst, "SetLineColor"):
1662  properties.extend(["LineColor", "LineStyle", "LineWidth"])
1663  if hasattr(src, "GetFillColor") and hasattr(dst, "SetFillColor"):
1664  properties.extend(["FillColor", "FillStyle"])
1665  if hasattr(src, "GetMarkerColor") and hasattr(dst, "SetMarkerColor"):
1666  properties.extend(["MarkerColor", "MarkerSize", "MarkerStyle"])
1667 
1668  for prop in properties:
1669  getattr(dst, "Set"+prop)(getattr(src, "Get"+prop)())
1670 
def _copyStyle(src, dst)
Definition: plotting.py:1659
def plotting._createCanvas (   name,
  width,
  height 
)
private

Definition at line 107 of file plotting.py.

Referenced by plotting.PlotGroup._drawSeparate(), ntuplePlotting.draw(), plotting.PlotGroup.draw(), and ntuplePlotting.drawMany().

107 def _createCanvas(name, width, height):
108  # silence warning of deleting canvas with the same name
109  if not verbose:
110  backup = ROOT.gErrorIgnoreLevel
111  ROOT.gErrorIgnoreLevel = ROOT.kError
112  canvas = ROOT.TCanvas(name, name, width, height)
113  if not verbose:
114  ROOT.gErrorIgnoreLevel = backup
115  return canvas
116 
def _createCanvas(name, width, height)
Definition: plotting.py:107
def plotting._drawFrame (   pad,
  bounds,
  zmax = None,
  xbinlabels = None,
  xbinlabelsize = None,
  xbinlabeloption = None,
  ybinlabels = None,
  suffix = "" 
)
private
Function to draw a frame

Arguments:
pad    -- TPad to where the frame is drawn
bounds -- List or 4-tuple for (xmin, ymin, xmax, ymax)

Keyword arguments:
zmax            -- Maximum Z, needed for TH2 histograms
xbinlabels      -- Optional list of strings for x axis bin labels
xbinlabelsize   -- Optional number for the x axis bin label size
xbinlabeloption -- Optional string for the x axis bin options (passed to ROOT.TH1.LabelsOption())
suffix          -- Optional string for a postfix of the frame name

Definition at line 1183 of file plotting.py.

1183 def _drawFrame(pad, bounds, zmax=None, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None, suffix=""):
1184  """Function to draw a frame
1185 
1186  Arguments:
1187  pad -- TPad to where the frame is drawn
1188  bounds -- List or 4-tuple for (xmin, ymin, xmax, ymax)
1189 
1190  Keyword arguments:
1191  zmax -- Maximum Z, needed for TH2 histograms
1192  xbinlabels -- Optional list of strings for x axis bin labels
1193  xbinlabelsize -- Optional number for the x axis bin label size
1194  xbinlabeloption -- Optional string for the x axis bin options (passed to ROOT.TH1.LabelsOption())
1195  suffix -- Optional string for a postfix of the frame name
1196  """
1197  if xbinlabels is None and ybinlabels is None:
1198  frame = pad.DrawFrame(*bounds)
1199  else:
1200  # Special form needed if want to set x axis bin labels
1201  nbins = len(xbinlabels)
1202  if ybinlabels is None:
1203  frame = ROOT.TH1F("hframe"+suffix, "", nbins, bounds[0], bounds[2])
1204  frame.SetMinimum(bounds[1])
1205  frame.SetMaximum(bounds[3])
1206  frame.GetYaxis().SetLimits(bounds[1], bounds[3])
1207  else:
1208  ybins = len(ybinlabels)
1209  frame = ROOT.TH2F("hframe"+suffix, "", nbins,bounds[0],bounds[2], ybins,bounds[1],bounds[3])
1210  frame.SetMaximum(zmax)
1211 
1212  frame.SetBit(ROOT.TH1.kNoStats)
1213  frame.SetBit(ROOT.kCanDelete)
1214  frame.Draw("")
1215 
1216  xaxis = frame.GetXaxis()
1217  for i in xrange(nbins):
1218  xaxis.SetBinLabel(i+1, xbinlabels[i])
1219  if xbinlabelsize is not None:
1220  xaxis.SetLabelSize(xbinlabelsize)
1221  if xbinlabeloption is not None:
1222  frame.LabelsOption(xbinlabeloption)
1223 
1224  if ybinlabels is not None:
1225  yaxis = frame.GetYaxis()
1226  for i, lab in enumerate(ybinlabels):
1227  yaxis.SetBinLabel(i+1, lab)
1228  if xbinlabelsize is not None:
1229  yaxis.SetLabelSize(xbinlabelsize)
1230  if xbinlabeloption is not None:
1231  frame.LabelsOption(xbinlabeloption, "Y")
1232 
1233  return frame
1234 
def _drawFrame(pad, bounds, zmax=None, xbinlabels=None, xbinlabelsize=None, xbinlabeloption=None, ybinlabels=None, suffix="")
Definition: plotting.py:1183
def plotting._findBounds (   th1s,
  ylog,
  xmin = None,
  xmax = None,
  ymin = None,
  ymax = None 
)
private
Find x-y axis boundaries encompassing a list of TH1s if the bounds are not given in arguments.

Arguments:
th1s -- List of TH1s
ylog -- Boolean indicating if y axis is in log scale or not (affects the automatic ymax)

Keyword arguments:
xmin -- Minimum x value; if None, take the minimum of TH1s
xmax -- Maximum x value; if None, take the maximum of TH1s
ymin -- Minimum y value; if None, take the minimum of TH1s
ymax -- Maximum y value; if None, take the maximum of TH1s

Definition at line 455 of file plotting.py.

References _findBoundsY(), _getXmax(), _getXmin(), SiStripPI.max, min(), and str.

Referenced by ntuplePlotting.drawSingle().

455 def _findBounds(th1s, ylog, xmin=None, xmax=None, ymin=None, ymax=None):
456  """Find x-y axis boundaries encompassing a list of TH1s if the bounds are not given in arguments.
457 
458  Arguments:
459  th1s -- List of TH1s
460  ylog -- Boolean indicating if y axis is in log scale or not (affects the automatic ymax)
461 
462  Keyword arguments:
463  xmin -- Minimum x value; if None, take the minimum of TH1s
464  xmax -- Maximum x value; if None, take the maximum of TH1s
465  ymin -- Minimum y value; if None, take the minimum of TH1s
466  ymax -- Maximum y value; if None, take the maximum of TH1s
467  """
468 
469  (ymin, ymax) = _findBoundsY(th1s, ylog, ymin, ymax)
470 
471  if xmin is None or xmax is None or isinstance(xmin, list) or isinstance(max, list):
472  xmins = []
473  xmaxs = []
474  for th1 in th1s:
475  xmins.append(_getXmin(th1, limitToNonZeroContent=isinstance(xmin, list)))
476  xmaxs.append(_getXmax(th1, limitToNonZeroContent=isinstance(xmax, list)))
477 
478  # Filter out cases where histograms have zero content
479  xmins = [h for h in xmins if h is not None]
480  xmaxs = [h for h in xmaxs if h is not None]
481 
482  if xmin is None:
483  xmin = min(xmins)
484  elif isinstance(xmin, list):
485  if len(xmins) == 0: # all histograms zero
486  xmin = min(xmin)
487  if verbose:
488  print "Histogram is zero, using the smallest given value for xmin from", str(xmin)
489  else:
490  xm = min(xmins)
491  xmins_below = [x for x in xmin if x<=xm]
492  if len(xmins_below) == 0:
493  xmin = min(xmin)
494  if xm < xmin:
495  if verbose:
496  print "Histogram minimum x %f is below all given xmin values %s, using the smallest one" % (xm, str(xmin))
497  else:
498  xmin = max(xmins_below)
499 
500  if xmax is None:
501  xmax = max(xmaxs)
502  elif isinstance(xmax, list):
503  if len(xmaxs) == 0: # all histograms zero
504  xmax = max(xmax)
505  if verbose:
506  print "Histogram is zero, using the smallest given value for xmax from", str(xmin)
507  else:
508  xm = max(xmaxs)
509  xmaxs_above = [x for x in xmax if x>xm]
510  if len(xmaxs_above) == 0:
511  xmax = max(xmax)
512  if xm > xmax:
513  if verbose:
514  print "Histogram maximum x %f is above all given xmax values %s, using the maximum one" % (xm, str(xmax))
515  else:
516  xmax = min(xmaxs_above)
517 
518  for th1 in th1s:
519  th1.GetXaxis().SetRangeUser(xmin, xmax)
520 
521  return (xmin, ymin, xmax, ymax)
522 
def _findBoundsY(th1s, ylog, ymin=None, ymax=None, coverage=None, coverageRange=None)
Definition: plotting.py:523
def _findBounds(th1s, ylog, xmin=None, xmax=None, ymin=None, ymax=None)
Definition: plotting.py:455
def _getXmax(obj, limitToNonZeroContent=False)
Definition: plotting.py:354
T min(T a, T b)
Definition: MathUtil.h:58
def _getXmin(obj, limitToNonZeroContent=False)
Definition: plotting.py:338
#define str(s)
def plotting._findBoundsY (   th1s,
  ylog,
  ymin = None,
  ymax = None,
  coverage = None,
  coverageRange = None 
)
private
Find y axis boundaries encompassing a list of TH1s if the bounds are not given in arguments.

Arguments:
th1s -- List of TH1s
ylog -- Boolean indicating if y axis is in log scale or not (affects the automatic ymax)

Keyword arguments:
ymin -- Minimum y value; if None, take the minimum of TH1s
ymax -- Maximum y value; if None, take the maximum of TH1s
coverage -- If set, use only values within the 'coverage' part around the median are used for min/max (useful for ratio)
coverageRange -- If coverage and this are set, use only the x axis specified by an (xmin,xmax) pair for the coverage 

Definition at line 523 of file plotting.py.

References _getYmax(), _getYmin(), _getYminIgnoreOutlier(), _getYminMaxAroundMedian(), SiStripPI.max, min(), and str.

Referenced by _findBounds().

523 def _findBoundsY(th1s, ylog, ymin=None, ymax=None, coverage=None, coverageRange=None):
524  """Find y axis boundaries encompassing a list of TH1s if the bounds are not given in arguments.
525 
526  Arguments:
527  th1s -- List of TH1s
528  ylog -- Boolean indicating if y axis is in log scale or not (affects the automatic ymax)
529 
530  Keyword arguments:
531  ymin -- Minimum y value; if None, take the minimum of TH1s
532  ymax -- Maximum y value; if None, take the maximum of TH1s
533  coverage -- If set, use only values within the 'coverage' part around the median are used for min/max (useful for ratio)
534  coverageRange -- If coverage and this are set, use only the x axis specified by an (xmin,xmax) pair for the coverage
535  """
536  if coverage is not None or isinstance(th1s[0], ROOT.TH2):
537  # the only use case for coverage for now is ratio, for which
538  # the scalings are not needed (actually harmful), so let's
539  # just ignore them if 'coverage' is set
540  #
541  # Also for TH2 do not adjust automatic y bounds
542  y_scale_max = lambda y: y
543  y_scale_min = lambda y: y
544  else:
545  if ylog:
546  y_scale_max = lambda y: y*1.5
547  else:
548  y_scale_max = lambda y: y*1.05
549  y_scale_min = lambda y: y*0.9 # assuming log
550 
551  if ymin is None or ymax is None or isinstance(ymin, list) or isinstance(ymax, list):
552  ymins = []
553  ymaxs = []
554  for th1 in th1s:
555  if coverage is not None:
556  (_ymin, _ymax) = _getYminMaxAroundMedian(th1, coverage, coverageRange)
557  else:
558  if ylog and isinstance(ymin, list):
559  _ymin = _getYminIgnoreOutlier(th1)
560  else:
561  _ymin = _getYmin(th1, limitToNonZeroContent=isinstance(ymin, list))
562  _ymax = _getYmax(th1, limitToNonZeroContent=isinstance(ymax, list))
563 # _ymax = _getYmaxWithError(th1)
564 
565  ymins.append(_ymin)
566  ymaxs.append(_ymax)
567 
568  if ymin is None:
569  ymin = min(ymins)
570  elif isinstance(ymin, list):
571  ym_unscaled = min(ymins)
572  ym = y_scale_min(ym_unscaled)
573  ymins_below = [y for y in ymin if y<=ym]
574  if len(ymins_below) == 0:
575  ymin = min(ymin)
576  if ym_unscaled < ymin:
577  if verbose:
578  print "Histogram minimum y %f is below all given ymin values %s, using the smallest one" % (ym, str(ymin))
579  else:
580  ymin = max(ymins_below)
581 
582  if ymax is None:
583  # in case ymax is automatic, ymin is set by list, and the
584  # histograms are zero, ensure here that ymax > ymin
585  ymax = y_scale_max(max(ymaxs+[ymin]))
586  elif isinstance(ymax, list):
587  ym_unscaled = max(ymaxs)
588  ym = y_scale_max(ym_unscaled)
589  ymaxs_above = [y for y in ymax if y>ym]
590  if len(ymaxs_above) == 0:
591  ymax = max(ymax)
592  if ym_unscaled > ymax:
593  if verbose:
594  print "Histogram maximum y %f is above all given ymax values %s, using the maximum one" % (ym_unscaled, str(ymax))
595  else:
596  ymax = min(ymaxs_above)
597 
598  for th1 in th1s:
599  th1.GetYaxis().SetRangeUser(ymin, ymax)
600 
601  return (ymin, ymax)
602 
def _getYmax(obj, limitToNonZeroContent=False)
Definition: plotting.py:385
def _findBoundsY(th1s, ylog, ymin=None, ymax=None, coverage=None, coverageRange=None)
Definition: plotting.py:523
def _getYmin(obj, limitToNonZeroContent=False)
Definition: plotting.py:370
def _getYminIgnoreOutlier(th1)
Definition: plotting.py:403
T min(T a, T b)
Definition: MathUtil.h:58
def _getYminMaxAroundMedian(obj, coverage, coverageRange=None)
Definition: plotting.py:419
#define str(s)
def plotting._getDirectory (   args,
  kwargs 
)
private

Definition at line 95 of file plotting.py.

References _getDirectoryDetailed().

Referenced by plotting.PlotterTableItem.create().

95 def _getDirectory(*args, **kwargs):
96  return GetDirectoryCode.codesToNone(_getDirectoryDetailed(*args, **kwargs))
97 
def _getDirectory(args, kwargs)
Definition: plotting.py:95
def _getDirectoryDetailed(tfile, possibleDirs, subDir=None)
Definition: plotting.py:71
def plotting._getDirectoryDetailed (   tfile,
  possibleDirs,
  subDir = None 
)
private
Get TDirectory from TFile.

Definition at line 71 of file plotting.py.

References join().

Referenced by _getDirectory(), and plotting.PlotterFolder.create().

71 def _getDirectoryDetailed(tfile, possibleDirs, subDir=None):
72  """Get TDirectory from TFile."""
73  if tfile is None:
75  for pdf in possibleDirs:
76  d = tfile.Get(pdf)
77  if d:
78  if subDir is not None:
79  # Pick associator if given
80  d = d.Get(subDir)
81  if d:
82  return d
83  else:
84  if verbose:
85  print "Did not find subdirectory '%s' from directory '%s' in file %s" % (subDir, pdf, tfile.GetName())
86 # if "Step" in subDir:
87 # raise Exception("Foo")
89  else:
90  return d
91  if verbose:
92  print "Did not find any of directories '%s' from file %s" % (",".join(possibleDirs), tfile.GetName())
94 
def _getDirectoryDetailed(tfile, possibleDirs, subDir=None)
Definition: plotting.py:71
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def plotting._getObject (   tdirectory,
  name 
)
private

Definition at line 47 of file plotting.py.

Referenced by _getOrCreateObject(), plotting.Subtract.create(), plotting.FakeDuplicate.create(), plotting.AggregateHistos.create(), and plotting.PlotterFolder.create().

47 def _getObject(tdirectory, name):
48  obj = tdirectory.Get(name)
49  if not obj:
50  if verbose:
51  print "Did not find {obj} from {dir}".format(obj=name, dir=tdirectory.GetPath())
52  return None
53  return obj
54 
def _getObject(tdirectory, name)
Definition: plotting.py:47
def plotting._getOrCreateObject (   tdirectory,
  nameOrCreator 
)
private

Definition at line 55 of file plotting.py.

References _getObject().

Referenced by trackingPlots.TimePerEventPlot._create(), plotting.Plot._createOne(), plotting.Transform.create(), plotting.CutEfficiency.create(), plotting.AggregateBins.create(), plotting.ROC.create(), and trackingPlots.TimePerTrackPlot.create().

55 def _getOrCreateObject(tdirectory, nameOrCreator):
56  if hasattr(nameOrCreator, "create"):
57  return nameOrCreator.create(tdirectory)
58  return _getObject(tdirectory, nameOrCreator)
59 
def _getOrCreateObject(tdirectory, nameOrCreator)
Definition: plotting.py:55
def _getObject(tdirectory, name)
Definition: plotting.py:47
def plotting._getXmax (   obj,
  limitToNonZeroContent = False 
)
private

Definition at line 354 of file plotting.py.

References SiStripPI.max, and str.

Referenced by _findBounds().

354 def _getXmax(obj, limitToNonZeroContent=False):
355  if isinstance(obj, ROOT.TH1):
356  xaxis = obj.GetXaxis()
357  if limitToNonZeroContent:
358  for i in xrange(obj.GetNbinsX(), 0, -1):
359  if obj.GetBinContent(i) != 0:
360  return xaxis.GetBinUpEdge(i)
361  # None for all bins being zero
362  return None
363  else:
364  return xaxis.GetBinUpEdge(xaxis.GetLast())
365  elif isinstance(obj, ROOT.TGraph) or isinstance(obj, ROOT.TGraph2D):
366  m = max([obj.GetX()[i] for i in xrange(0, obj.GetN())])
367  return m*1.1 if m > 0 else m*0.9
368  raise Exception("Unsupported type %s" % str(obj))
369 
def _getXmax(obj, limitToNonZeroContent=False)
Definition: plotting.py:354
#define str(s)
def plotting._getXmin (   obj,
  limitToNonZeroContent = False 
)
private

Definition at line 338 of file plotting.py.

References min(), and str.

Referenced by _findBounds().

338 def _getXmin(obj, limitToNonZeroContent=False):
339  if isinstance(obj, ROOT.TH1):
340  xaxis = obj.GetXaxis()
341  if limitToNonZeroContent:
342  for i in xrange(1, obj.GetNbinsX()+1):
343  if obj.GetBinContent(i) != 0:
344  return xaxis.GetBinLowEdge(i)
345  # None for all bins being zero
346  return None
347  else:
348  return xaxis.GetBinLowEdge(xaxis.GetFirst())
349  elif isinstance(obj, ROOT.TGraph) or isinstance(obj, ROOT.TGraph2D):
350  m = min([obj.GetX()[i] for i in xrange(0, obj.GetN())])
351  return m*0.9 if m > 0 else m*1.1
352  raise Exception("Unsupported type %s" % str(obj))
353 
T min(T a, T b)
Definition: MathUtil.h:58
def _getXmin(obj, limitToNonZeroContent=False)
Definition: plotting.py:338
#define str(s)
def plotting._getYmax (   obj,
  limitToNonZeroContent = False 
)
private

Definition at line 385 of file plotting.py.

References SiStripPI.max, and str.

Referenced by _findBoundsY().

385 def _getYmax(obj, limitToNonZeroContent=False):
386  if isinstance(obj, ROOT.TH2):
387  yaxis = obj.GetYaxis()
388  return yaxis.GetBinUpEdge(yaxis.GetLast())
389  elif isinstance(obj, ROOT.TH1):
390  if limitToNonZeroContent:
391  lst = [obj.GetBinContent(i) for i in xrange(1, obj.GetNbinsX()+1) if obj.GetBinContent(i) != 0 ]
392  return max(lst) if len(lst) != 0 else 0
393  else:
394  return obj.GetMaximum()
395  elif isinstance(obj, ROOT.TGraph) or isinstance(obj, ROOT.TGraph2D):
396  m = max([obj.GetY()[i] for i in xrange(0, obj.GetN())])
397  return m*1.1 if m > 0 else m*0.9
398  raise Exception("Unsupported type %s" % str(obj))
399 
def _getYmax(obj, limitToNonZeroContent=False)
Definition: plotting.py:385
#define str(s)
def plotting._getYmaxWithError (   th1)
private

Definition at line 400 of file plotting.py.

References SiStripPI.max.

401  return max([th1.GetBinContent(i)+th1.GetBinError(i) for i in xrange(1, th1.GetNbinsX()+1)])
402 
def _getYmaxWithError(th1)
Definition: plotting.py:400
def plotting._getYmin (   obj,
  limitToNonZeroContent = False 
)
private

Definition at line 370 of file plotting.py.

References min(), and str.

Referenced by _findBoundsY().

370 def _getYmin(obj, limitToNonZeroContent=False):
371  if isinstance(obj, ROOT.TH2):
372  yaxis = obj.GetYaxis()
373  return yaxis.GetBinLowEdge(yaxis.GetFirst())
374  elif isinstance(obj, ROOT.TH1):
375  if limitToNonZeroContent:
376  lst = [obj.GetBinContent(i) for i in xrange(1, obj.GetNbinsX()+1) if obj.GetBinContent(i) != 0 ]
377  return min(lst) if len(lst) != 0 else 0
378  else:
379  return obj.GetMinimum()
380  elif isinstance(obj, ROOT.TGraph) or isinstance(obj, ROOT.TGraph2D):
381  m = min([obj.GetY()[i] for i in xrange(0, obj.GetN())])
382  return m*0.9 if m > 0 else m*1.1
383  raise Exception("Unsupported type %s" % str(obj))
384 
def _getYmin(obj, limitToNonZeroContent=False)
Definition: plotting.py:370
T min(T a, T b)
Definition: MathUtil.h:58
#define str(s)
def plotting._getYminIgnoreOutlier (   th1)
private

Definition at line 403 of file plotting.py.

References createfilelist.int.

Referenced by _findBoundsY().

404  yvals = sorted([n for n in [th1.GetBinContent(i) for i in xrange(1, th1.GetNbinsX()+1)] if n>0])
405  if len(yvals) == 0:
406  return th1.GetMinimum()
407  if len(yvals) == 1:
408  return yvals[0]
409 
410  # Define outlier as being x10 less than minimum of the 95 % of the non-zero largest values
411  ind_min = len(yvals)-1 - int(len(yvals)*0.95)
412  min_val = yvals[ind_min]
413  for i in xrange(0, ind_min):
414  if yvals[i] > 0.1*min_val:
415  return yvals[i]
416 
417  return min_val
418 
def _getYminIgnoreOutlier(th1)
Definition: plotting.py:403
def plotting._getYminMaxAroundMedian (   obj,
  coverage,
  coverageRange = None 
)
private

Definition at line 419 of file plotting.py.

References createfilelist.int, and str.

Referenced by _findBoundsY().

419 def _getYminMaxAroundMedian(obj, coverage, coverageRange=None):
420  inRange = lambda x: True
421  inRange2 = lambda xmin,xmax: True
422  if coverageRange:
423  inRange = lambda x: coverageRange[0] <= x <= coverageRange[1]
424  inRange2 = lambda xmin,xmax: coverageRange[0] <= xmin and xmax <= coverageRange[1]
425 
426  if isinstance(obj, ROOT.TH1):
427  yvals = [obj.GetBinContent(i) for i in xrange(1, obj.GetNbinsX()+1) if inRange2(obj.GetXaxis().GetBinLowEdge(i), obj.GetXaxis().GetBinUpEdge(i))]
428  yvals = [x for x in yvals if x != 0]
429  elif isinstance(obj, ROOT.TGraph) or isinstance(obj, ROOT.TGraph2D):
430  yvals = [obj.GetY()[i] for i in xrange(0, obj.GetN()) if inRange(obj.GetX()[i])]
431  else:
432  raise Exception("Unsupported type %s" % str(obj))
433  if len(yvals) == 0:
434  return (0, 0)
435  if len(yvals) == 1:
436  return (yvals[0], yvals[0])
437  if len(yvals) == 2:
438  return (yvals[0], yvals[1])
439 
440  yvals.sort()
441  nvals = int(len(yvals)*coverage)
442  if nvals < 2:
443  # Take median and +- 1 values
444  if len(yvals) % 2 == 0:
445  half = len(yvals)/2
446  return ( yvals[half-1], yvals[half] )
447  else:
448  middle = len(yvals)/2
449  return ( yvals[middle-1], yvals[middle+1] )
450  ind_min = (len(yvals)-nvals)/2
451  ind_max = len(yvals)-1 - ind_min
452 
453  return (yvals[ind_min], yvals[ind_max])
454 
def _getYminMaxAroundMedian(obj, coverage, coverageRange=None)
Definition: plotting.py:419
#define str(s)
def plotting._mergeBinLabels (   labelsAll)
private

Definition at line 709 of file plotting.py.

References SiStripPI.max.

Referenced by _mergeBinLabelsX(), and _mergeBinLabelsY().

709 def _mergeBinLabels(labelsAll):
710  labels_merged = labelsAll[0]
711  for labels in labelsAll[1:]:
712  diff = difflib.unified_diff(labels_merged, labels, n=max(len(labels_merged), len(labels)))
713  labels_merged = []
714  operation = []
715  for item in diff: # skip the "header" lines
716  if item[:2] == "@@":
717  break
718  for item in diff:
719  operation.append(item[0])
720  lab = item[1:]
721  if lab in labels_merged:
722  # pick the last addition of the bin
723  ind = labels_merged.index(lab)
724  if operation[ind] == "-" and operation[-1] == "+":
725  labels_merged.remove(lab)
726  del operation[ind] # to keep xbinlabels and operation indices in sync
727  elif operation[ind] == "+" and operation[-1] == "-":
728  del operation[-1] # to keep xbinlabels and operation indices in sync
729  continue
730  else:
731  raise Exception("This should never happen")
732  labels_merged.append(lab)
733  # unified_diff returns empty diff if labels_merged and labels are equal
734  # so if labels_merged is empty here, it can be just set to labels
735  if len(labels_merged) == 0:
736  labels_merged = labels
737 
738  return labels_merged
739 
def _mergeBinLabels(labelsAll)
Definition: plotting.py:709
def plotting._mergeBinLabelsX (   histos)
private

Definition at line 703 of file plotting.py.

References _mergeBinLabels().

Referenced by trackingPlots.TrackingSeedingLayerTable.draw(), and plotting.Plot.draw().

703 def _mergeBinLabelsX(histos):
704  return _mergeBinLabels([[h.GetXaxis().GetBinLabel(i) for i in xrange(1, h.GetNbinsX()+1)] for h in histos])
705 
def _mergeBinLabels(labelsAll)
Definition: plotting.py:709
def _mergeBinLabelsX(histos)
Definition: plotting.py:703
def plotting._mergeBinLabelsY (   histos)
private

Definition at line 706 of file plotting.py.

References _mergeBinLabels().

Referenced by plotting.Plot.draw().

706 def _mergeBinLabelsY(histos):
707  return _mergeBinLabels([[h.GetYaxis().GetBinLabel(i) for i in xrange(1, h.GetNbinsY()+1)] for h in histos])
708 
def _mergeBinLabelsY(histos)
Definition: plotting.py:706
def _mergeBinLabels(labelsAll)
Definition: plotting.py:709
def plotting._modifyPadForRatio (   pad,
  ratioFactor 
)
private

Definition at line 117 of file plotting.py.

Referenced by ntuplePlotting.draw(), and ntuplePlotting.drawMany().

117 def _modifyPadForRatio(pad, ratioFactor):
118  pad.Divide(1, 2)
119 
120  divisionPoint = 1-1/ratioFactor
121 
122  topMargin = pad.GetTopMargin()
123  bottomMargin = pad.GetBottomMargin()
124  divisionPoint += (1-divisionPoint)*bottomMargin # correct for (almost-)zeroing bottom margin of pad1
125  divisionPointForPad1 = 1-( (1-divisionPoint) / (1-0.02) ) # then correct for the non-zero bottom margin, but for pad1 only
126 
127  # Set the lower point of the upper pad to divisionPoint
128  pad1 = pad.cd(1)
129  yup = 1.0
130  ylow = divisionPointForPad1
131  xup = 1.0
132  xlow = 0.0
133  pad1.SetPad(xlow, ylow, xup, yup)
134  pad1.SetFillStyle(4000) # transparent
135  pad1.SetBottomMargin(0.02) # need some bottom margin here for eps/pdf output (at least in ROOT 5.34)
136 
137  # Set the upper point of the lower pad to divisionPoint
138  pad2 = pad.cd(2)
139  yup = divisionPoint
140  ylow = 0.0
141  pad2.SetPad(xlow, ylow, xup, yup)
142  pad2.SetFillStyle(4000) # transparent
143  pad2.SetTopMargin(0.0)
144  pad2.SetBottomMargin(bottomMargin/(ratioFactor*divisionPoint))
145 
def _modifyPadForRatio(pad, ratioFactor)
Definition: plotting.py:117
def plotting._setStyle ( )
private

Definition at line 19 of file plotting.py.

19 def _setStyle():
20  _absoluteSize = True
21  if _absoluteSize:
22  font = 43
23  titleSize = 22
24  labelSize = 22
25  statSize = 14
26  else:
27  font = 42
28  titleSize = 0.05
29  labelSize = 0.05
30  statSize = 0.025
31 
32  ROOT.gROOT.SetStyle("Plain")
33  ROOT.gStyle.SetPadRightMargin(0.07)
34  ROOT.gStyle.SetPadLeftMargin(0.13)
35  ROOT.gStyle.SetTitleFont(font, "XYZ")
36  ROOT.gStyle.SetTitleSize(titleSize, "XYZ")
37  ROOT.gStyle.SetTitleOffset(1.2, "Y")
38  #ROOT.gStyle.SetTitleFontSize(0.05)
39  ROOT.gStyle.SetLabelFont(font, "XYZ")
40  ROOT.gStyle.SetLabelSize(labelSize, "XYZ")
41  ROOT.gStyle.SetTextSize(labelSize)
42  ROOT.gStyle.SetStatFont(font)
43  ROOT.gStyle.SetStatFontSize(statSize)
44 
45  ROOT.TGaxis.SetMaxDigits(4)
46 
def _setStyle()
Definition: plotting.py:19
def plotting._th1IncludeOnlyBins (   histos,
  xbinlabels 
)
private

Definition at line 740 of file plotting.py.

Referenced by trackingPlots.TrackingSeedingLayerTable.draw(), and plotting.Plot.draw().

740 def _th1IncludeOnlyBins(histos, xbinlabels):
741  histos_new = []
742  for h in histos:
743  h_new = h.Clone(h.GetName()+"_xbinlabels")
744  h_new.SetBins(len(xbinlabels), h.GetBinLowEdge(1), h.GetBinLowEdge(1)+len(xbinlabels))
745  for i, label in enumerate(xbinlabels):
746  bin = h.GetXaxis().FindFixBin(label)
747  if bin >= 0:
748  h_new.SetBinContent(i+1, h.GetBinContent(bin))
749  h_new.SetBinError(i+1, h.GetBinError(bin))
750  else:
751  h_new.SetBinContent(i+1, 0)
752  h_new.SetBinError(i+1, 0)
753  histos_new.append(h_new)
754  return histos_new
755 
756 
def _th1IncludeOnlyBins(histos, xbinlabels)
Definition: plotting.py:740
def plotting._th1RemoveEmptyBins (   histos,
  xbinlabels 
)
private

Definition at line 603 of file plotting.py.

Referenced by trackingPlots.TrackingSeedingLayerTable.draw().

603 def _th1RemoveEmptyBins(histos, xbinlabels):
604  binsToRemove = set()
605  for b in xrange(1, histos[0].GetNbinsX()+1):
606  binEmpty = True
607  for h in histos:
608  if h.GetBinContent(b) > 0:
609  binEmpty = False
610  break
611  if binEmpty:
612  binsToRemove.add(b)
613 
614  if len(binsToRemove) > 0:
615  # filter xbinlabels
616  xbinlab_new = []
617  for i in xrange(len(xbinlabels)):
618  if (i+1) not in binsToRemove:
619  xbinlab_new.append(xbinlabels[i])
620  xbinlabels = xbinlab_new
621 
622  # filter histogram bins
623  histos_new = []
624  for h in histos:
625  values = []
626  for b in xrange(1, h.GetNbinsX()+1):
627  if b not in binsToRemove:
628  values.append( (h.GetXaxis().GetBinLabel(b), h.GetBinContent(b), h.GetBinError(b)) )
629 
630  if len(values) > 0:
631  h_new = h.Clone(h.GetName()+"_empty")
632  h_new.SetBins(len(values), h.GetBinLowEdge(1), h.GetBinLowEdge(1)+len(values))
633  for b, (l, v, e) in enumerate(values):
634  h_new.GetXaxis().SetBinLabel(b+1, l)
635  h_new.SetBinContent(b+1, v)
636  h_new.SetBinError(b+1, e)
637 
638  histos_new.append(h_new)
639  histos = histos_new
640 
641  return (histos, xbinlabels)
642 
def _th1RemoveEmptyBins(histos, xbinlabels)
Definition: plotting.py:603
def plotting._th1ToOrderedDict (   th1,
  renameBin = None 
)
private

Definition at line 98 of file plotting.py.

Referenced by trackingPlots.TrackingSummaryTable.create(), and plotting.AggregateBins.create().

98 def _th1ToOrderedDict(th1, renameBin=None):
99  values = collections.OrderedDict()
100  for i in xrange(1, th1.GetNbinsX()+1):
101  binLabel = th1.GetXaxis().GetBinLabel(i)
102  if renameBin is not None:
103  binLabel = renameBin(binLabel)
104  values[binLabel] = (th1.GetBinContent(i), th1.GetBinError(i))
105  return values
106 
def _th1ToOrderedDict(th1, renameBin=None)
Definition: plotting.py:98
def plotting._th2RemoveEmptyBins (   histos,
  xbinlabels,
  ybinlabels 
)
private

Definition at line 643 of file plotting.py.

643 def _th2RemoveEmptyBins(histos, xbinlabels, ybinlabels):
644  xbinsToRemove = set()
645  ybinsToRemove = set()
646  for ih, h in enumerate(histos):
647  for bx in xrange(1, h.GetNbinsX()+1):
648  binEmpty = True
649  for by in xrange(1, h.GetNbinsY()+1):
650  if h.GetBinContent(bx, by) > 0:
651  binEmpty = False
652  break
653  if binEmpty:
654  xbinsToRemove.add(bx)
655  elif ih > 0:
656  xbinsToRemove.discard(bx)
657 
658  for by in xrange(1, h.GetNbinsY()+1):
659  binEmpty = True
660  for bx in xrange(1, h.GetNbinsX()+1):
661  if h.GetBinContent(bx, by) > 0:
662  binEmpty = False
663  break
664  if binEmpty:
665  ybinsToRemove.add(by)
666  elif ih > 0:
667  ybinsToRemove.discard(by)
668 
669  if len(xbinsToRemove) > 0 or len(ybinsToRemove) > 0:
670  xbinlabels_new = []
671  xbins = []
672  for b in xrange(1, len(xbinlabels)+1):
673  if b not in xbinsToRemove:
674  xbinlabels_new.append(histos[0].GetXaxis().GetBinLabel(b))
675  xbins.append(b)
676  xbinlabels = xbinlabels_new
677  ybinlabels_new = []
678  ybins = []
679  for b in xrange(1, len(ybinlabels)+1):
680  if b not in ybinsToRemove:
681  ybinlabels.append(histos[0].GetYaxis().GetBinLabel(b))
682  ybins.append(b)
683  ybinlabels = xbinlabels_new
684 
685  histos_new = []
686  if len(xbinlabels) == 0 or len(ybinlabels) == 0:
687  return (histos_new, xbinlabels, ybinlabels)
688  for h in histos:
689  h_new = ROOT.TH2F(h.GetName()+"_empty", h.GetTitle(), len(xbinlabels),0,len(xbinlabels), len(ybinlabels),0,len(ybinlabels))
690  for b, l in enumerate(xbinlabels):
691  h_new.GetXaxis().SetBinLabel(b+1, l)
692  for b, l in enumerate(ybinlabels):
693  h_new.GetYaxis().SetBinLabel(b+1, l)
694 
695  for ix, bx in enumerate(xbins):
696  for iy, by in enumerate(ybins):
697  h_new.SetBinContent(ix+1, iy+1, h.GetBinContent(bx, by))
698  h_new.SetBinError(ix+1, iy+1, h.GetBinError(bx, by))
699  histos_new.append(h_new)
700  histos = histos_new
701  return (histos, xbinlabels, ybinlabels)
702 
def _th2RemoveEmptyBins(histos, xbinlabels, ybinlabels)
Definition: plotting.py:643

Variable Documentation

plotting._gr
private

Definition at line 241 of file plotting.py.

plotting._plotStylesColor
private

Definition at line 1180 of file plotting.py.

plotting._plotStylesMarker
private

Definition at line 1181 of file plotting.py.

plotting._ratio
private

Definition at line 201 of file plotting.py.

plotting._ratioYTitle
private

Definition at line 17 of file plotting.py.

plotting._th1
private

Definition at line 193 of file plotting.py.

plotting._uncertainty
private

Definition at line 194 of file plotting.py.

plotting._xerrshigh
private

Definition at line 245 of file plotting.py.

plotting._xerrslow
private

Definition at line 244 of file plotting.py.

plotting._xvalues
private

Definition at line 243 of file plotting.py.

plotting._yerrshigh
private

Definition at line 247 of file plotting.py.

plotting._yerrslow
private

Definition at line 248 of file plotting.py.

plotting._yvalues
private

Definition at line 246 of file plotting.py.

plotting.IgnoreCommandLineOptions

Definition at line 12 of file plotting.py.

plotting.verbose

Definition at line 16 of file plotting.py.