from jhplot import *
p0=P0D()
# 100 numbers (Normal distribution)
p0.randomNormal(1000,0.0,2.0) # mean=0, sigma=2
h1=H1D("Normal",40,-10,10)
h1.fill(p0) # fill a histogram with 1D array
c1=HPlot()
c1.visible(); c1.setAutoRange()
c1.draw(h1)
c1.drawStatBox(h1) # show statistics
stat= h1.getStat()
print stat["mean"],"+-",stat["mean_error"]