ROOT
Version master
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
v6.04
Reference Guide
►
ROOT
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
hist032_TRatioPlot_fit_lines.py
2
## \ingroup tutorial_hist
3
## \notebook
4
## Example that shows custom dashed lines on the lower plot, specified by a vector of floats.
5
##
6
## By default, dashed lines are drawn at certain points. You can either disable them, or specify
7
## where you want them to appear.
8
## Inspired by the tutorial of Paul Gessinger.
9
##
10
## \macro_image
11
## \macro_code
12
##
13
## \author Alberto Ferro
14
15
import
ROOT
16
17
ROOT.gStyle.SetOptStat
(0)
18
19
c1 =
ROOT.TCanvas
(
"c1"
,
"fit residual simple"
)
20
h1 =
ROOT.TH1D
(
"h1"
,
"h1"
, 50, -5, 5)
21
h1.FillRandom
(
"gaus"
, 2000)
22
h1.Fit
(
"gaus"
)
23
h1.GetXaxis
().SetTitle(
"x"
)
24
h1.GetYaxis
().SetTitle(
"y"
)
25
26
rp1 =
ROOT.TRatioPlot
(h1)
27
28
lines =
ROOT.std.vector
(
'double'
)()
29
for
i
in
range
(-3,4):
lines.push_back
(i)
30
rp1.SetGridlines
(lines)
31
32
rp1.Draw
()
33
rp1.GetLowerRefGraph
().SetMinimum(-4)
34
rp1.GetLowerRefGraph
().SetMaximum(4)
35
36
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
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
tutorials
hist
hist032_TRatioPlot_fit_lines.py
ROOT master - Reference Guide Generated on Sun Mar 2 2025 15:20:40 (GVA Time) using Doxygen 1.10.0