Welcome to JupyROOT 6.07/07
h = ROOT.TH1F("myHisto","My Histo;X axis;Y axis",64, -4, 4)
Time to create a random generator and fill our histogram:
rndmGenerator = ROOT.TRandom3() for i in xrange(1000): rndm = rndmGenerator.Gaus() h.Fill(rndm)
c = ROOT.TCanvas() h.Draw() c.Draw()
We'll try now to beautify the plot a bit, for example filling the histogram with a colour and setting a grid on the canvas.
h.SetFillColor(ROOT.kBlue-10) c.SetGrid() h.Draw() c.Draw()
Alright: we are done with our first step into the ROOTbooks world!