Logo ROOT  
Reference Guide
df021_createTGraph.py
Go to the documentation of this file.
1## \file
2## \ingroup tutorial_dataframe
3## \notebook -draw
4## This tutorial shows how to fill a TGraph using the Dataframe.
5##
6## \macro_code
7## \macro_image
8##
9## \date July 2018
10## \authors Enrico Guiraud, Danilo Piparo, Massimo Tumolo
11
12import ROOT
13
14ROOT.ROOT.EnableImplicitMT(2)
15d = ROOT.RDataFrame(160)
16
17# Create a trivial parabola
18dd = d.Alias("x", "rdfentry_").Define("y", "x*x")
19
20graph = 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.
23graph.Sort()
24graph.Draw("APL")
25
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Definition: RDataFrame.hxx:42