Logo ROOT  
Reference Guide
df021_createTGraph.py File Reference

Namespaces

 df021_createTGraph
 

Detailed Description

View in nbviewer Open in SWAN Fill a TGraph using RDataFrame.

import ROOT
ROOT.ROOT.EnableImplicitMT(2)
# 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.
c = ROOT.TCanvas()
graph.Sort()
graph.Draw("APL")
c.SaveAs("df021_createTGraph.png")
print("Saved figure to df021_createTGraph.png")
Date
July 2018
Authors
Enrico Guiraud, Danilo Piparo (CERN), Massimo Tumolo (Politecnico di Torino)

Definition in file df021_createTGraph.py.

ROOT::RDataFrame
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...
Definition: RDataFrame.hxx:42