ROOT
v6-34
Reference Guide
Loading...
Searching...
No Matches
df021_createTGraph.py
Go to the documentation of this file.
1
## \file
2
## \ingroup tutorial_dataframe
3
## \notebook -draw
4
## Fill a TGraph using RDataFrame.
5
##
6
## \macro_code
7
## \macro_image
8
##
9
## \date July 2018
10
## \authors Enrico Guiraud, Danilo Piparo (CERN), Massimo Tumolo (Politecnico di Torino)
11
12
import
ROOT
13
14
ROOT.ROOT.EnableImplicitMT
(2)
15
d =
ROOT.RDataFrame
(160)
16
17
# Create a trivial parabola
18
dd =
d.Alias
(
"x"
,
"rdfentry_"
).Define(
"y"
,
"x*x"
)
19
20
graph =
dd.Graph
(
"x"
,
"y"
)
21
22
# This tutorial is ran with multithreading enabled. The order in which points are inserted is not known, so to have a meaningful representation points are sorted.
23
c =
ROOT.TCanvas
()
24
graph.Sort
()
25
graph.Draw
(
"APL"
)
26
c.SaveAs
(
"df021_createTGraph.png"
)
27
28
print(
"Saved figure to df021_createTGraph.png"
)
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::RDataFrame
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Definition
RDataFrame.hxx:41
tutorials
dataframe
df021_createTGraph.py
ROOT v6-34 - Reference Guide Generated on Fri Jan 24 2025 14:44:17 (GVA Time) using Doxygen 1.10.0