Hi Mark,
in C++, how about
#include <ROOT/RDataFrame.hxx> // until v6.12, ROOT/TDataFrame.hxx
int main()
{
TApplication app("app", nullptr, nullptr); // to keep program alive after you draw a canvas
// until v6.12, ROOT::Experimental::TDataFrame
ROOT::RDataFrame df("treeename", "file.root");
auto histoy = df.Filter("x > 0").Histo1D("y");
histoy->Draw();
app.Run(); // keep program alive after drawing canvas
return 0;
}
See this answer for an overview of the different available interfaces to access data stored in ROOT trees.
Cheers,
Enrico