Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ratioplot5.py
Go to the documentation of this file.
1## \file
2## \ingroup tutorial_hist
3## \notebook
4## Example that shows how you can set the colors of the confidence interval bands by using
5## the method `TRatioPlot::SetConfidenceIntervalColors`.
6## Inspired by the tutorial of Paul Gessinger.
7##
8## \macro_image
9## \macro_code
10##
11## \author Alberto Ferro
12
13import ROOT
14
15ROOT.gStyle.SetOptStat(0)
16
17c1 = ROOT.TCanvas("c1", "fit residual simple")
18h1 = ROOT.TH1D("h1", "h1", 50, -5, 5)
19h1.FillRandom("gaus", 2000)
20h1.Fit("gaus")
21h1.GetXaxis().SetTitle("x")
22h1.GetYaxis().SetTitle("y")
23
24rp1 = ROOT.TRatioPlot(h1)
25rp1.SetConfidenceIntervalColors(ROOT.kBlue, ROOT.kRed)
26rp1.Draw()
27c1.Update()