Logo ROOT   6.16/01
Reference Guide
Namespaces
df021_createTGraph.py File Reference

Namespaces

namespace  df021_createTGraph
 

Detailed Description

View in nbviewer Open in SWAN This tutorial shows how to fill a TGraph using the Dataframe.

import ROOT
ROOT.ROOT.EnableImplicitMT(2)
d = ROOT.ROOT.RDataFrame(160)
# Create a trivial parabola
dd = d.Alias("x", "rdfentry_").Define("y", "x*x")
graph = dd.Graph("x", "y")
# 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.
graph.Sort()
graph.Draw("APL")
Date
July 2018
Authors
Enrico Guiraud, Danilo Piparo, Massimo Tumolo

Definition in file df021_createTGraph.py.