RatioPlot¶
-
class
RatioPlot.RatioPlot(numerator, denominator=0, **kwargs)[source]¶ Bases:
MethodProxy.MethodProxyClass for comparing 1-dimensional histograms.
Inherits from Histo1Dwhich inherits fromROOT.TH1D, see official documentation as well!Compares histograms to a baseline by computing the ratio for each bin.
The properties of the baseline (which is itself of type
Histo1D) of theRatioPlotobject can be accessed by prepending the prefix ‘baseline’ in front of the property name.-
__init__(numerator, denominator=0, **kwargs)[source]¶ Initialize a ratio plot for 1-dimensional histograms.
Create an instance of
RatioPlotwith the specified (list of) numerator histogram(s) and denominator histogram.Parameters: - numerator – numerator histogram or list thereof
- denominator – denominator histogram which will act as the baseline
- **kwargs –
RatioPlotproperties
-
SetYMin(value)[source]¶ Set the minimal value of the y-axis.
Parameters: value ( float) – minimal value of the y-axis
-
SetYMax(value)[source]¶ Set the maximal value of the y-axis.
Parameters: value ( float) – maximal value of the y-axis
-
SetDrawOption(option)[source]¶ Define the draw option for all numerator histograms.
Parameters: option ( str) – draw option (seeROOT.THistPainterclass reference)
-
GetDrawOption()[source]¶ Return the draw option defined for all numerator histograms.
Returntype: str
-
SetDrawArrows(boolean)[source]¶ Define whether the arrows should be drawn.
Parameters: boolean ( bool) – if set toTruearrows will be drawn whenever the ratio is outside the given y-axis range
-