Very basic question
I’m just starting out learning ROOT.
I’m trying to make a basic histogram and go from there.
This is what I have. Just some generic numbers.
import ROOT
c1=ROOT.TCanvas()
h1 = ROOT.TH1F(“h1”, “h1 title”, 7, 0, 100)
h1.Fill(42)
h1.Fill(42)
h1.Fill(4)
h1.Fill(17)
h1.Fill(7)
h1.Fill(17)
h1.Fill(7)
h1.SetLineColor(2)
h1.Draw(“E1”)
h1.Draw()
When I run it, I can see the histogram for like a half second then the window closes again.
I can make changes and see the changes being made to the graph but it doesn’t stay open.
I don’t get any error messages.
What am I missing?