Hello!
I have a two column of data: Energy and Flux. I am trying to draw histogram with energy in x-axis and flux in y-axis. However, I am not getting the desired result as I am only getting empty canvas. Here is my code:
{
TFile *f = new TFile("data.root", "RECREATE");
TNtuple *t= new TNtuple("Flux_data", "Data from DUNE", "Energy:Flux");
t->ReadFile("data.txt");
TH1F h("Flux_hist", "Energy vs. Flux; Energy; Flux", 25, 0, 50);
t->Draw("Flux>>Flux_Hist");
h.Write();
f->Close();
}