MPF.legend module

class MPF.legend.Legend(scaleLegend=1, scaleLegendX=None, scaleLegendY=None, drawstring='', nColumns=1, xOffset=0, yOffset=0, forceDynamicFontSize=False, noDynamicFontSize=False, addEventCount=False, eventCountCutflow=False, eventCountGen=False)[source]

Bases: ROOT.TLegend

Parameters:
  • scaleLegend – Scale Legend by this factor
  • scaleLegendX – Scale Legend by this factor in x-direction
  • scaleLegendY – Scale Legend by this factor in x-direction
  • drawstring – Drawstring for ROOT TLegend
  • nColumns – Number of columns
  • xOffset – Shift legend in x direction
  • yOffset – Shift legend in y direction
  • forceDynamicFontSize – Always use dynamic font size (scale text to fit legend)
  • noDynamicFontSize – Never use dynamic font size (by default used for legends containing long titles)
  • addEventCount – Add the total event counts to the legend
  • eventCountCutflow – Use the content of the last bin instead of the integral when showing total event counts
  • eventCountGen – In addition to the integral, also show the number of raw events
addEntry(obj, option)[source]
addEventCount(label, obj)[source]
draw()[source]
hasLongTitleEntry()[source]