Graph with errors from RDataFrame

Thanks Enrico,

I found an example here ROOT: tutorials/dataframe/df005_fillAnyObject.C File Reference on how to use the Fill method but I could not figure out how to use it on TGraphErrors since I don’t find this class to expose a Fill method. But following this post Coloured scatterplot from TDataFrame - #2 by eguiraud I could make the TGraphErrors from the dataframe:

TGraphErrors* gtrue;

auto fillTrueValuesGraph = [&gtrue](int set, double y, double err_y){
      gtrue->SetPoint(gtrue->GetN(), set, y);
      gtrue->SetPointError( gtrue->GetN()-1, 0, err_y );
   };

df.Foreach(fillTrueValuesGraph, {"set", "y", "err_y"});