It should work, I just tried with hsimple.root from ROOT tutorials:
root [0] ROOT::RDataFrame d("ntuple", "hsimple.root");
root [1] auto h = d.Histo1D("px");
root [2] h->Draw();
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Thank you, I found my mistake! I had put everything inside a .C file and ran that with .L, but forgot to create a void function to call “h->Draw()”. Now everything works fine.