Logo ROOT   6.07/09
Reference Guide
TRatioPlot.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Paul Gessinger 25/08/2016
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2016, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TRatioPlot
13 #define ROOT_TRatioPlot
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // ROOT_TRatioPlot //
19 // //
20 // A collection of histograms //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 
28 #ifndef ROOT_TString
29 #include "TString.h"
30 #endif
31 
32 #ifndef ROOT_TGraph
33 #include "TGraph.h"
34 #endif
35 
36 class TH1;
37 class TPad;
38 class TVirtualPad;
39 class TGraphAsymmErrors;
40 class TGraphErrors;
41 class TAxis;
42 class TGaxis;
43 class TLine;
44 class TFitResultPtr;
45 class TFitResult;
46 class THStack;
47 class TBrowser;
48 class TFileMergeInfo;
49 
50 class TRatioPlot : public TObject {
51 
52 private:
53  TRatioPlot& operator=(const TRatioPlot&) = delete; // Not implemented
54  TRatioPlot(const TRatioPlot &hrp) = delete;
55 
57  kDivideHist = 1, ///< Use `TH1::Divide` to create the ratio.
58  kDivideGraph = 2, ///< Use `TGraphAsymmErrors::Divide` to create the ratio.
59  kDifference = 3, ///< Calculate the difference between the histograms.
60  kFitResidual = 4, ///< Calculate the fit residual between the histogram and a fit stored within it.
61  kDifferenceSign = 5 ///< Calculate the difference divided by the error.
62  };
63 
64  enum ErrorMode {
65  kErrorSymmetric = 1, ///< Use the regular `TH1::GetBinError` as the error
66  kErrorAsymmetric = 2, ///< Use `TH1::GetBinErrorUp` and `TH1::GetBinErrorLow` for the error, depending on y values.
67  kErrorFunc = 3 ///< Use the square root of the function value as the error.
68  };
69 
71  kHideUp = 1, ///< Hide the first label of the upper y axis when there is low space.
72  kHideLow = 2, ///< Hide the last label of the lower y axis when there is low space.
73  kNoHide = 3, ///< Do not hide labels when there is low space.
74  kForceHideUp = 4, ///< Always hide the first label of the upper y axis
75  kForceHideLow = 5 ///< Always hide the last label of the lower y axis
76  };
77 
78 
79 protected:
80 
81  TVirtualPad *fParentPad = 0; ///< Stores the pad the ratio plot was created in
82  TPad *fUpperPad = 0; ///< The pad which contains the upper plot part
83  TPad *fLowerPad = 0; ///< The pad which contains the calculated lower plot part
84  TPad *fTopPad = 0; ///< The Pad that drawn on top on the others to have consistent coordinates
85 
86  TH1 *fH1 = 0; ///< Stores the primary histogram
87  TH1 *fH2 = 0; ///< Stores the secondary histogram, if there is one
88  TObject *fHistDrawProxy = 0; ///< The object which is actually drawn, this might be TH1 or THStack
89 
90  Int_t fMode = 0; ///< Stores which calculation is supposed to be performed as specified by user option
91  Int_t fErrorMode = TRatioPlot::ErrorMode::kErrorSymmetric; ///< Stores the error mode, sym, asym or func
92  TString fOption = ""; ///< Stores the option which is given in the constructor as a string
93  TString fH1DrawOpt = ""; ///< Stores draw option for h1 given in constructor
94  TString fH2DrawOpt = ""; ///< Stores draw option for h2 given in constructor
95  TString fGraphDrawOpt = ""; ///< Stores draw option for the lower plot graph given in constructor
96  TString fFitDrawOpt = ""; ///< Stores draw option for the fit function in the fit residual case
97 
98  Float_t fSplitFraction = 0.3; ///< Stores the fraction at which the upper and lower pads meet
99 
100  TGraph *fRatioGraph = 0; ///< Stores the lower plot's graph
101  TGraphErrors *fConfidenceInterval1 = 0; ///< Stores the graph for the 1 sigma band
102  TGraphErrors *fConfidenceInterval2 = 0; ///< Stores the graph for the 2 sigma band
103  Color_t fCi1Color = kGreen; ///< Stores the color for the 1 sigma band
104  Color_t fCi2Color = kYellow; ///< Stores the color for the 2 sigma band
105 
106  Bool_t fShowConfidenceIntervals = kTRUE; ///< Stores whether to show the confidence interval bands. From Draw option
107 
108  Double_t fCl1 = 0.6827; ///< Stores the confidence level for the inner confidence interval band
109  Double_t fCl2 = 0.9545; ///< Stores the confidence level for the outer confidence interval band
110 
111  Double_t fC1 = 1.; ///< Stores the scale factor for h1 (or THStack sum)
112  Double_t fC2 = 1.; ///< Stores the scale factor for h2
113 
114  TFitResult *fFitResult = 0; ///< Stores the explicit fit result given in the fit residual case. Can be 0
115 
116  TAxis *fSharedXAxis = 0; ///< X axis that stores the range for both plots
117  TGaxis *fUpperGXaxis = 0; ///< Upper graphical x axis
118  TGaxis *fLowerGXaxis = 0; ///< Lower graphical x axis
119  TGaxis *fUpperGYaxis = 0; ///< Upper graphical y axis
120  TGaxis *fLowerGYaxis = 0; ///< Lower graphical y axis
121  TGaxis *fUpperGXaxisMirror = 0; ///< Upper mirror of the x axis
122  TGaxis *fLowerGXaxisMirror = 0; ///< Lower mirror of the x axis
123  TGaxis *fUpperGYaxisMirror = 0; ///< Upper mirror of the y axis
124  TGaxis *fLowerGYaxisMirror = 0; ///< Lower mirror of the y axis
125 
126  TAxis *fUpYaxis = 0; ///< Clone of the upper y axis
127  TAxis *fLowYaxis = 0; ///< Clone of the lower y axis
128 
129  std::vector<TLine*> fGridlines; ///< Keeps TLine objects for the gridlines
130  std::vector<double> fGridlinePositions; ///< Stores the y positions for the gridlines
131  Bool_t fShowGridlines = kTRUE; ///< Stores whether to show the gridlines at all
132  Int_t fHideLabelMode = TRatioPlot::HideLabelMode::kHideLow; ///< Stores which label to hide if the margin is to narrow, if at all
133 
134  // store margins to be able do determine
135  // what has changed when user drags
136  Float_t fUpTopMargin = 0.1; ///< Stores the top margin of the upper pad
137  Float_t fUpBottomMargin = 0.05; ///< Stores the bottom margin of the upper pad
138  Float_t fLowTopMargin = 0.05; ///< Stores the top margin of the lower pad
139  Float_t fLowBottomMargin = 0.3; ///< Stores the bottom margin of the lower pad
140 
141  Float_t fLeftMargin = 0.1; ///< Stores the common left margin of both pads
142  Float_t fRightMargin = 0.1; ///< Stores the common right margin of both pads
143 
145 
146  Bool_t fIsUpdating = kFALSE; ///< Keeps track of whether its currently updating to reject other calls until done
147  Bool_t fIsPadUpdating = kFALSE; ///< Keeps track whether pads are updating during resizing
148 
149  virtual void SyncAxesRanges();
150  virtual void SetupPads();
151  virtual void CreateVisualAxes();
152  virtual Bool_t SyncPadMargins();
153  void SetPadMargins();
154  void CreateGridline();
155  void BuildLowerPlot();
156 
157  void ImportAxisAttributes(TGaxis* gaxis, TAxis* axis);
158 
159  Bool_t IsDrawn();
160 
161  virtual void Init(TH1* h1, TH1* h2, Option_t *option = "");
162 
163 public:
164 
165  TRatioPlot();
166  virtual ~TRatioPlot();
167  TRatioPlot(TH1* h1, TH1* h2, Option_t *option = "pois");
168 
169  TRatioPlot(THStack* st, TH1* h2, Option_t *option = "pois");
170 
171  TRatioPlot(TH1* h1, Option_t *option = "", TFitResult *fitres = 0);
172 
173  void SetH1DrawOpt(Option_t *opt);
174  void SetH2DrawOpt(Option_t *opt);
175  void SetGraphDrawOpt(Option_t *opt);
176  void SetFitDrawOpt(Option_t *opt);
177 
178  void SetInsetWidth(Double_t width);
179 
180  virtual void Draw(Option_t *chopt="");
181  virtual void Browse(TBrowser *b);
182 
183 
184  virtual void Paint(Option_t *opt = "");
185 
186  // Slots for signal receiving
187  void UnZoomed();
188  void RangeAxisChanged();
189  void SubPadResized();
190 
191  // Getters
192  TAxis *GetXaxis() const { return fSharedXAxis; }
193  TAxis *GetUpYaxis() const { return fUpYaxis; }
194  TAxis *GetLowYaxis() const { return fLowYaxis; }
195 
196  virtual TGraph *GetLowerRefGraph() const;
197 
198  ////////////////////////////////////////////////////////////////////////////////
199  /// Shortcut for:
200  ///
201  /// ~~~{.cpp}
202  /// rp->GetLowerRefGraph()->GetXaxis();
203  /// ~~~
204 
206 
207  ////////////////////////////////////////////////////////////////////////////////
208  /// Shortcut for:
209  ///
210  /// ~~~{.cpp}
211  /// rp->GetLowerRefGraph()->GetYaxis();
212  /// ~~~
213 
215 
216  virtual TObject *GetUpperRefObject() const;
217  TAxis *GetUpperRefXaxis() const;
218  TAxis *GetUpperRefYaxis() const;
219 
220  ////////////////////////////////////////////////////////////////////////////////
221  /// Get the output of the calculation in the form of a graph. The type of
222  /// the return value depends on the input option that was given in the constructor.
223 
225 
226  ////////////////////////////////////////////////////////////////////////////////
227  /// Returns the graph for the 1 sigma confidence interval in the fit residual case
228 
230 
231  ////////////////////////////////////////////////////////////////////////////////
232  /// Returns the graph for the 2 sigma confidence interval in the fit residual case
233 
235 
236  TPad * GetUpperPad() const { return fUpperPad; }
237  TPad * GetLowerPad() const { return fLowerPad; }
238 
239  // Setters
240 
241  ////////////////////////////////////////////////////////////////////////////////
242  /// Explicitly specify the fit result that is to be used for fit residual calculation.
243  /// If it is not provided, the last fit registered in the global fitter is used.
244  /// The fit result can also be specified in the constructor.
245  ///
246  /// \param fitres The fit result coming from the fit function call
247 
248  void SetFitResult(TFitResultPtr fitres) { fFitResult = fitres.Get(); }
249 
250  // Setters for margins
251  void SetUpTopMargin(Float_t margin);
252  void SetUpBottomMargin(Float_t margin);
253  void SetLowTopMargin(Float_t margin);
254  void SetLowBottomMargin(Float_t margin);
255  void SetLeftMargin(Float_t margin);
256  void SetRightMargin(Float_t margin);
257 
260  void SetSplitFraction(Float_t sf);
261  void SetConfidenceLevels(Double_t cl1, Double_t cl2);
262 
263  virtual void SetGridlines(Double_t *gridlines, Int_t numGridlines);
264  virtual void SetGridlines(std::vector<double> gridlines);
265 
267 
268  void SetC1(Double_t c1) { fC1 = c1; }
269  void SetC2(Double_t c2) { fC2 = c2; }
270 
271  ClassDef(TRatioPlot, 1) //A ratio of histograms
272 };
273 
274 #endif
TRatioPlot()
TRatioPlot default constructor.
Definition: TRatioPlot.cxx:156
TVirtualPad * fParentPad
Stores the pad the ratio plot was created in.
Definition: TRatioPlot.h:81
virtual TObject * GetUpperRefObject() const
Return the reference object.
Definition: TRatioPlot.cxx:750
TGaxis * fUpperGYaxisMirror
Upper mirror of the y axis.
Definition: TRatioPlot.h:123
void SetUpBottomMargin(Float_t margin)
Sets the bottom margin of the upper pad.
Definition: TRatioPlot.cxx:498
void SetFitResult(TFitResultPtr fitres)
Explicitly specify the fit result that is to be used for fit residual calculation.
Definition: TRatioPlot.h:248
The Histogram stack class.
Definition: THStack.h:35
TRatioPlot & operator=(const TRatioPlot &)=delete
float Float_t
Definition: RtypesCore.h:53
void RangeAxisChanged()
Slot that receives the RangeAxisChanged signal from any of the pads and reacts correspondingly.
const char Option_t
Definition: RtypesCore.h:62
return c1
Definition: legend1.C:41
Float_t fLowTopMargin
Stores the top margin of the lower pad.
Definition: TRatioPlot.h:138
TH1 * fH2
Stores the secondary histogram, if there is one.
Definition: TRatioPlot.h:87
Color_t fCi2Color
Stores the color for the 2 sigma band.
Definition: TRatioPlot.h:104
void SetLeftMargin(Float_t margin)
Sets the left margin of both pads.
Definition: TRatioPlot.cxx:530
TAxis * GetUpperRefXaxis() const
Gets the x axis of the object returned by TRatioPlot::GetUpperRefObject.
Definition: TRatioPlot.cxx:768
TAxis * fLowYaxis
Clone of the lower y axis.
Definition: TRatioPlot.h:127
virtual void SyncAxesRanges()
Syncs the axes ranges from the shared ones to the actual ones.
Definition: TRatioPlot.cxx:887
TObject * fHistDrawProxy
The object which is actually drawn, this might be TH1 or THStack.
Definition: TRatioPlot.h:88
TGraph * fRatioGraph
Stores the lower plot&#39;s graph.
Definition: TRatioPlot.h:100
void SetInsetWidth(Double_t width)
Set the inset on the outer sides of all the pads.
virtual void Draw(Option_t *chopt="")
Draws the ratio plot to the currently active pad.
Definition: TRatioPlot.cxx:591
void SetSplitFraction(Float_t sf)
Set the fraction of the parent pad, at which the to sub pads should meet.
Float_t fSplitFraction
Stores the fraction at which the upper and lower pads meet.
Definition: TRatioPlot.h:98
Basic string class.
Definition: TString.h:137
TString fH2DrawOpt
Stores draw option for h2 given in constructor.
Definition: TRatioPlot.h:94
void BuildLowerPlot()
Build the lower plot according to which constructor was called, and which options were passed...
Definition: TRatioPlot.cxx:907
TGraphErrors * GetConfidenceInterval2() const
Returns the graph for the 2 sigma confidence interval in the fit residual case.
Definition: TRatioPlot.h:234
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Int_t fErrorMode
Stores the error mode, sym, asym or func.
Definition: TRatioPlot.h:91
const Bool_t kFALSE
Definition: Rtypes.h:92
void SetConfidenceLevels(Double_t cl1, Double_t cl2)
Sets the confidence levels used to calculate the bands in the fit residual case.
Definition: Rtypes.h:61
Definition: Rtypes.h:61
Float_t fInsetWidth
Definition: TRatioPlot.h:144
TString fGraphDrawOpt
Stores draw option for the lower plot graph given in constructor.
Definition: TRatioPlot.h:95
Double_t fCl1
Stores the confidence level for the inner confidence interval band.
Definition: TRatioPlot.h:108
void SetLowBottomMargin(Float_t margin)
Sets the bottom margin of the lower pad.
Definition: TRatioPlot.cxx:520
TFitResult * fFitResult
Stores the explicit fit result given in the fit residual case. Can be 0.
Definition: TRatioPlot.h:114
void SetH1DrawOpt(Option_t *opt)
Sets the drawing option for h1.
Definition: TRatioPlot.cxx:392
TString fH1DrawOpt
Stores draw option for h1 given in constructor.
Definition: TRatioPlot.h:93
TGraphErrors * fConfidenceInterval2
Stores the graph for the 2 sigma band.
Definition: TRatioPlot.h:102
std::vector< double > fGridlinePositions
Stores the y positions for the gridlines.
Definition: TRatioPlot.h:130
TGraph with asymmetric error bars.
Calculate the difference between the histograms.
Definition: TRatioPlot.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
TGaxis * fLowerGXaxisMirror
Lower mirror of the x axis.
Definition: TRatioPlot.h:122
TString fFitDrawOpt
Stores draw option for the fit function in the fit residual case.
Definition: TRatioPlot.h:96
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O...
Definition: TFitResult.h:36
Use TH1::Divide to create the ratio.
Definition: TRatioPlot.h:57
Int_t fMode
Stores which calculation is supposed to be performed as specified by user option. ...
Definition: TRatioPlot.h:90
void UnZoomed()
Slot for the UnZoomed signal that was introduced to TAxis.
virtual void SetupPads()
Setup the pads.
Definition: TRatioPlot.cxx:428
Color_t fCi1Color
Stores the color for the 1 sigma band.
Definition: TRatioPlot.h:103
TAxis * GetUpperRefYaxis() const
Gets the y axis of the object returned by TRatioPlot::GetUpperRefObject.
Definition: TRatioPlot.cxx:786
TPad * fUpperPad
The pad which contains the upper plot part.
Definition: TRatioPlot.h:82
Bool_t IsDrawn()
Check if ... is drawn.
TAxis * GetLowYaxis() const
Definition: TRatioPlot.h:194
void SetConfidenceIntervalColors(Color_t ci1=kGreen, Color_t ci2=kYellow)
Set the confidence interval colors.
void SetH2DrawOpt(Option_t *opt)
Sets the drawing option for h2.
Definition: TRatioPlot.cxx:400
Hide the first label of the upper y axis when there is low space.
Definition: TRatioPlot.h:71
TH1F * h1
Definition: legend1.C:5
TGaxis * fUpperGXaxisMirror
Upper mirror of the x axis.
Definition: TRatioPlot.h:121
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
Use the regular TH1::GetBinError as the error.
Definition: TRatioPlot.h:65
virtual TGraph * GetLowerRefGraph() const
Returns the reference graph for the lower pad, which means the graph that is responsible for setting ...
Definition: TRatioPlot.cxx:716
Double_t fCl2
Stores the confidence level for the outer confidence interval band.
Definition: TRatioPlot.h:109
virtual ~TRatioPlot()
Destructor.
Definition: TRatioPlot.cxx:163
short Color_t
Definition: RtypesCore.h:79
TPad * GetLowerPad() const
Definition: TRatioPlot.h:237
TAxis * GetLowerRefXaxis() const
Shortcut for:
Definition: TRatioPlot.h:205
virtual Bool_t SyncPadMargins()
Figures out which pad margin has deviated from the stored ones, to figure out what the new nominal is...
virtual void SetGridlines(Double_t *gridlines, Int_t numGridlines)
Set where horizontal, dashed lines are drawn on the lower pad.
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
Double_t fC1
Stores the scale factor for h1 (or THStack sum)
Definition: TRatioPlot.h:111
TGaxis * fUpperGYaxis
Upper graphical y axis.
Definition: TRatioPlot.h:119
Always hide the first label of the upper y axis.
Definition: TRatioPlot.h:74
TAxis * GetXaxis() const
Get x axis of the graph.
Definition: TGraph.cxx:1586
Class to manage histogram axis.
Definition: TAxis.h:36
virtual void Init(TH1 *h1, TH1 *h2, Option_t *option="")
Internal method that shares constructor logic.
Definition: TRatioPlot.cxx:198
Use TH1::GetBinErrorUp and TH1::GetBinErrorLow for the error, depending on y values.
Definition: TRatioPlot.h:66
TPad * GetUpperPad() const
Definition: TRatioPlot.h:236
std::vector< TLine * > fGridlines
Keeps TLine objects for the gridlines.
Definition: TRatioPlot.h:129
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:33
Bool_t fShowGridlines
Stores whether to show the gridlines at all.
Definition: TRatioPlot.h:131
TGraphErrors * GetConfidenceInterval1() const
Returns the graph for the 1 sigma confidence interval in the fit residual case.
Definition: TRatioPlot.h:229
void SetUpTopMargin(Float_t margin)
Sets the top margin of the upper pad.
Definition: TRatioPlot.cxx:487
The most important graphics class in the ROOT system.
Definition: TPad.h:37
A simple line.
Definition: TLine.h:33
Float_t fLeftMargin
Stores the common left margin of both pads.
Definition: TRatioPlot.h:141
TGaxis * fUpperGXaxis
Upper graphical x axis.
Definition: TRatioPlot.h:117
Int_t fHideLabelMode
Stores which label to hide if the margin is to narrow, if at all.
Definition: TRatioPlot.h:132
The axis painter class.
Definition: TGaxis.h:30
TH1 * fH1
Stores the primary histogram.
Definition: TRatioPlot.h:86
void SetPadMargins()
Sets the margins of all the pads to the value specified in class members.
virtual void CreateVisualAxes()
(Re-)Creates the TGAxis objects that are used for consistent display of the axes. ...
Float_t fRightMargin
Stores the common right margin of both pads.
Definition: TRatioPlot.h:142
Use the square root of the function value as the error.
Definition: TRatioPlot.h:67
TGaxis * fLowerGXaxis
Lower graphical x axis.
Definition: TRatioPlot.h:118
TPad * fLowerPad
The pad which contains the calculated lower plot part.
Definition: TRatioPlot.h:83
void SetFitDrawOpt(Option_t *opt)
Sets the drawing option for the fit in the fit residual case.
Definition: TRatioPlot.cxx:420
return c2
Definition: legend2.C:14
void CreateGridline()
Create a grid line.
Definition: TRatioPlot.cxx:804
Bool_t fIsUpdating
Keeps track of whether its currently updating to reject other calls until done.
Definition: TRatioPlot.h:146
double Double_t
Definition: RtypesCore.h:55
Use TGraphAsymmErrors::Divide to create the ratio.
Definition: TRatioPlot.h:58
Hide the last label of the lower y axis when there is low space.
Definition: TRatioPlot.h:72
Float_t fUpTopMargin
Stores the top margin of the upper pad.
Definition: TRatioPlot.h:136
Float_t fUpBottomMargin
Stores the bottom margin of the upper pad.
Definition: TRatioPlot.h:137
TGraphErrors * fConfidenceInterval1
Stores the graph for the 1 sigma band.
Definition: TRatioPlot.h:101
TString fOption
Stores the option which is given in the constructor as a string.
Definition: TRatioPlot.h:92
Float_t GetSeparationMargin() const
Return the separation margin value.
Definition: TRatioPlot.cxx:569
TGaxis * fLowerGYaxisMirror
Lower mirror of the y axis.
Definition: TRatioPlot.h:124
The TH1 histogram class.
Definition: TH1.h:80
void SetSeparationMargin(Float_t)
Sets the margin that separates the two pads.
Definition: TRatioPlot.cxx:558
void SetGraphDrawOpt(Option_t *opt)
Sets the drawing option for the lower graph.
Definition: TRatioPlot.cxx:412
Always hide the last label of the lower y axis.
Definition: TRatioPlot.h:75
Float_t fLowBottomMargin
Stores the bottom margin of the lower pad.
Definition: TRatioPlot.h:139
TAxis * fSharedXAxis
X axis that stores the range for both plots.
Definition: TRatioPlot.h:116
TFitResult * Get() const
Return contained pointer.
Mother of all ROOT objects.
Definition: TObject.h:44
TAxis * GetYaxis() const
Get y axis of the graph.
Definition: TGraph.cxx:1596
TAxis * GetLowerRefYaxis() const
Shortcut for:
Definition: TRatioPlot.h:214
TAxis * fUpYaxis
Clone of the upper y axis.
Definition: TRatioPlot.h:126
Double_t fC2
Stores the scale factor for h2.
Definition: TRatioPlot.h:112
Calculate the fit residual between the histogram and a fit stored within it.
Definition: TRatioPlot.h:60
TGraph * GetCalculationOutputGraph() const
Get the output of the calculation in the form of a graph.
Definition: TRatioPlot.h:224
void ImportAxisAttributes(TGaxis *gaxis, TAxis *axis)
Internal method to import TAxis attributes to a TGaxis.
Bool_t fShowConfidenceIntervals
Stores whether to show the confidence interval bands. From Draw option.
Definition: TRatioPlot.h:106
void SubPadResized()
Slot that handles common resizing of upper and lower pad.
TAxis * GetXaxis() const
Definition: TRatioPlot.h:192
void SetC2(Double_t c2)
Definition: TRatioPlot.h:269
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
void SetC1(Double_t c1)
Definition: TRatioPlot.h:268
A TGraphErrors is a TGraph with error bars.
Definition: TGraphErrors.h:28
virtual void Paint(Option_t *opt="")
Creates the visual axes when painting.
Definition: TRatioPlot.cxx:875
void SetRightMargin(Float_t margin)
Sets the right margin of both pads.
Definition: TRatioPlot.cxx:541
Class for displaying ratios, differences and fit residuals.
Definition: TRatioPlot.h:50
Bool_t fIsPadUpdating
Keeps track whether pads are updating during resizing.
Definition: TRatioPlot.h:147
Do not hide labels when there is low space.
Definition: TRatioPlot.h:73
const Bool_t kTRUE
Definition: Rtypes.h:91
TGaxis * fLowerGYaxis
Lower graphical y axis.
Definition: TRatioPlot.h:120
TAxis * GetUpYaxis() const
Definition: TRatioPlot.h:193
TPad * fTopPad
The Pad that drawn on top on the others to have consistent coordinates.
Definition: TRatioPlot.h:84
virtual void Browse(TBrowser *b)
Browse.
Definition: TRatioPlot.cxx:476
void SetLowTopMargin(Float_t margin)
Sets the top margin of the lower pad.
Definition: TRatioPlot.cxx:509
Calculate the difference divided by the error.
Definition: TRatioPlot.h:61