Fill a TGraph using RDataFrame.
Author: Enrico Guiraud, Danilo Piparo (CERN), Massimo Tumolo (Politecnico di Torino)
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Monday, March 27, 2023 at 09:46 AM.
ROOT::EnableImplicitMT(2);
ROOT::RDataFrame d(160);
Create a trivial parabola
auto dd = d.Alias("x", "rdfentry_").Define("y", "x*x");
auto 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();
auto c = new TCanvas();
graph->DrawClone("APL");
Draw all canvases
gROOT->GetListOfCanvases()->Draw()