Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ratioplot6.py
Go to the documentation of this file.
1## \file
2## \ingroup tutorial_hist
3## \notebook
4## Example showing a fit residual plot, where the separation margin has been set to 0.
5## The last label of the lower plot's y axis is hidden automatically.
6## Inspired by the tutorial of Paul Gessinger.
7##
8## \macro_image
9## \macro_code
10##
11## \author Alberto Ferro
12
13import ROOT
14
16
17c1 = ROOT.TCanvas("c1", "fit residual simple")
19
20h1 = ROOT.TH1D("h1", "h1", 50, -5, 5)
21h1.FillRandom("gaus", 5000)
22h1.Fit("gaus", "S")
23
25h1.GetXaxis().SetTitle("x")
26h1.GetYaxis().SetTitle("y")
27
28rp1 = ROOT.TRatioPlot(h1, "errfunc")
32rp1.GetLowerRefGraph().SetMinimum(-2)
33rp1.GetLowerRefGraph().SetMaximum(2)
34
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.