ROOT
master
Reference Guide
Loading...
Searching...
No Matches
hist033_TRatioPlot_fit_confidence.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
13
import
ROOT
14
15
ROOT.gStyle.SetOptStat
(0)
16
17
c1 =
ROOT.TCanvas
(
"c1"
,
"fit residual simple"
)
18
h1 =
ROOT.TH1D
(
"h1"
,
"h1"
, 50, -5, 5)
19
h1.FillRandom
(
"gaus"
, 2000)
20
h1.Fit
(
"gaus"
)
21
h1.GetXaxis
().SetTitle(
"x"
)
22
h1.GetYaxis
().SetTitle(
"y"
)
23
24
rp1 =
ROOT.TRatioPlot
(h1)
25
rp1.SetConfidenceIntervalColors
(
"kBlue"
,
"kRed"
)
26
rp1.Draw
()
27
c1.Update
()
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
tutorials
hist
hist033_TRatioPlot_fit_confidence.py
ROOT master - Reference Guide Generated on Thu Feb 13 2025 15:59:18 (GVA Time) using Doxygen 1.10.0