Cant use h1->Draw("L")?

I have been creating histogram plots for my root data outputs from Geant4, and everything works fine so far, but when i try to add a simple line connecting the points on my plotted histograms, they dont show on the Canvas?

TFile *f4 = new TFile("/home/skulmiya/Geant4/geant4-install/share/Geant4-10.2.2/examples/basic/SiliconDetector-build/Data1.root");
TCanvas* MyC4 = new TCanvas ("MyC4","Silicon Detector", 1)
p1 = (TH1D*)f4->Get("hist1");
p1->Draw("L") //here i was expecting lines to show on canvas but they dont

Yes, “L” is the the option. I might be that your histogram has build in errors and in that case you will need “HIST L” .

1 Like

Thank you , that seemed to have done it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.