TTree->Draw(...) using TGraphErrors


It is exist a methods to use the TTree::Draw(“x:y:z:t”,“constraints”) to plot a TGraphErrors with errorbars?

Right now I using a function like this:

void DrawWithError(TTree *tree, char *source="x:y:z:t", char *option="", char *goptions="ap"){ tree->Draw(source,option,"goff"); TGraphErrors *g; g = new TGraphErrors(tree->GetEntries(),tree->GetV1(),tree->GetV2(),tree->GetV3(),tree->GetV4()); g->Draw(goptions); }

If it is not existing I think should be added a function similar to that one inside the TTree. I think could be useful for a lot of users!

Thank you!


I agree, it is very basic function (graphs with errors), but somehow developers do not want to add it… :frowning: