Statistical characteristics of a histogram
Source code name: "histo_stat.py"
Programming language: Python
Topic: Statistics/Descriptive
DMelt Version 1.4. Last modified: 12/19/1970. License: Free
https://datamelt.org/code/cache/histo_stat_6422.py
To run this script using the DataMelt IDE,
copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.
from jhplot import *
p0=P0D()
p0.randomNormal(1000,0.0,2.0)
h1=H1D("Normal",40,-10,10)
h1.fill(p0)
c1=HPlot()
c1.visible(); c1.setAutoRange()
c1.draw(h1)
c1.drawStatBox(h1)
stat= h1.getStat()
print stat["mean"],"+-",stat["mean_error"]