Public Member Functions | |
def | __init__ |
def | addToLegend |
def | create |
def | draw |
def | getName |
def | getNumberOfHistograms |
Private Member Functions | |
def | _createOne |
def | _normalize |
def | _setStats |
Private Attributes | |
_frame | |
_histograms | |
_name | |
Represents one plot, comparing one or more histograms.
Definition at line 231 of file plotting.py.
def plotting.Plot.__init__ | ( | self, | |
name, | |||
kwargs | |||
) |
Constructor. Arguments: name -- String for name of the plot, or Efficiency object Keyword arguments: title -- String for a title of the plot (default None) xtitle -- String for x axis title (default None) ytitle -- String for y axis title (default None) ytitlesize -- Float for y axis title size (default None) ytitleoffset -- Float for y axis title offset (default None) xmin -- Float for x axis minimum (default None, i.e. automatic) xmax -- Float for x axis maximum (default None, i.e. automatic) ymin -- Float for y axis minimum (default 0) ymax -- Float for y axis maximum (default None, i.e. automatic) xlog -- Bool for x axis log status (default False) ylog -- Bool for y axis log status (default False) xgrid -- Bool for x axis grid status (default True) ygrid -- Bool for y axis grid status (default True) stat -- Draw stat box? (default False) fit -- Do gaussian fit? (default False) statx -- Stat box x coordinate (default 0.65) staty -- Stat box y coordinate (default 0.8) statyadjust -- List of floats for stat box y coordinate adjustments (default None) normalizeToUnitArea -- Normalize histograms to unit area? (default False) profileX -- Take histograms via ProfileX()? (default False) fitSlicesY -- Take histograms via FitSlicesY() (default False) scale -- Scale histograms by a number (default None) xbinlabels -- List of x axis bin labels (if given, default None) xbinlabelsize -- Size of x axis bin labels (default None) xbinlabeloption -- Option string for x axis bin labels (default None) drawStyle -- If "hist", draw as line instead of points (default None) drawCommand -- Deliver this to Draw() (default: None for same as drawStyle) lineWidth -- If drawStyle=="hist", the width of line (default 2) legendDx -- Float for moving TLegend in x direction for separate=True (default None) legendDy -- Float for moving TLegend in y direction for separate=True (default None) legendDw -- Float for changing TLegend width for separate=True (default None) legendDh -- Float for changing TLegend height for separate=True (default None) histogramModifier -- Function to be called in create() to modify the histograms (default None)
Definition at line 233 of file plotting.py.
|
private |
Create one histogram from a TDirectory.
Definition at line 330 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, LikelihoodSpecies._name, LikelihoodPdfProduct._name, LikelihoodPdf._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._name, HistoParams< T >._name, CutApplicatorBase._name, ElectronMVAEstimatorRun2Phys14NonTrig._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, plotting.FakeDuplicate._name, GeometricDetExtra._name, ElectronMVAEstimatorRun2Spring15NonTrig._name, HistoParams< TH2F >._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, HistoParams< TProfile2D >._name, plotting.Plot._name, Vispa.Views.PropertyView.Property._name, and SequenceTypes.SequencePlaceholder._name.
Referenced by plotting.Plot.create().
|
private |
Normalise histograms to unit area
Definition at line 431 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
|
private |
Set stats box.
Definition at line 390 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, DTSC._stat, and DTTrigGeom._stat.
Referenced by plotting.Plot.draw().
def plotting.Plot.addToLegend | ( | self, | |
legend, | |||
legendLabels | |||
) |
Add histograms to a legend. Arguments: legend -- TLegend legendLabels -- List of strings for the legend labels
Definition at line 554 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
def plotting.Plot.create | ( | self, | |
tdirs | |||
) |
Create histograms from list of TDirectories
Definition at line 351 of file plotting.py.
References plotting.Plot._createOne(), RunHistogramManager._histograms, plotting.Plot._histograms, plotting.AggregateBins._scale, Vispa.Gui.VispaWidget.VispaWidget._scale, HistoParams< TH1F >._title, HistoParams< TProfile >._title, HistoParams< T >._title, plotting.FakeDuplicate._title, HistoParams< TH2F >._title, HistoParams< TProfile2D >._title, and python.multivaluedict.map().
def plotting.Plot.draw | ( | self, | |
algo | |||
) |
Draw the histograms using values for a given algorithm.
Definition at line 442 of file plotting.py.
References plotting._findBounds(), RunHistogramManager._histograms, plotting.Plot._histograms, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, LikelihoodSpecies._name, LikelihoodPdfProduct._name, LikelihoodPdf._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._name, HistoParams< T >._name, CutApplicatorBase._name, ElectronMVAEstimatorRun2Phys14NonTrig._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, plotting.FakeDuplicate._name, GeometricDetExtra._name, ElectronMVAEstimatorRun2Spring15NonTrig._name, HistoParams< TH2F >._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, HistoParams< TProfile2D >._name, plotting.Plot._name, Vispa.Views.PropertyView.Property._name, SequenceTypes.SequencePlaceholder._name, plotting.Plot._normalize(), plotting.Plot._setStats(), MEGeom._xmax, HistoParams< T >._xmax, HistoParams< TH1F >._xmax, HistoParams< TProfile >._xmax, HistoParams< TH2F >._xmax, HistoParams< TProfile2D >._xmax, MEGeom._xmin, HistoParams< TH1F >._xmin, HistoParams< TProfile >._xmin, HistoParams< T >._xmin, HistoParams< TH2F >._xmin, HistoParams< TProfile2D >._xmin, MEGeom._ymax, HistoParams< TProfile >._ymax, HistoParams< T >._ymax, HistoParams< TH1F >._ymax, HistoParams< TH2F >._ymax, HistoParams< TProfile2D >._ymax, MEGeom._ymin, HistoParams< TProfile >._ymin, HistoParams< TH1F >._ymin, HistoParams< T >._ymin, HistoParams< TH2F >._ymin, and HistoParams< TProfile2D >._ymin.
def plotting.Plot.getName | ( | self | ) |
Definition at line 327 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, LikelihoodSpecies._name, LikelihoodPdfProduct._name, LikelihoodPdf._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._name, HistoParams< T >._name, CutApplicatorBase._name, ElectronMVAEstimatorRun2Phys14NonTrig._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, plotting.FakeDuplicate._name, GeometricDetExtra._name, ElectronMVAEstimatorRun2Spring15NonTrig._name, HistoParams< TH2F >._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, HistoParams< TProfile2D >._name, plotting.Plot._name, Vispa.Views.PropertyView.Property._name, and SequenceTypes.SequencePlaceholder._name.
def plotting.Plot.getNumberOfHistograms | ( | self | ) |
Return number of existing histograms.
Definition at line 323 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
|
private |
Definition at line 552 of file plotting.py.
|
private |
Definition at line 321 of file plotting.py.
Referenced by plotting.Plot._normalize(), plotting.Plot._setStats(), plotting.Plot.addToLegend(), plotting.Plot.create(), plotting.Plot.draw(), and plotting.Plot.getNumberOfHistograms().
|
private |
Definition at line 274 of file plotting.py.
Referenced by plotting.Plot._createOne(), plotting.PlotGroup._save(), plotting.Plot.draw(), and plotting.Plot.getName().