One dimensional histogram filled with Gaussian numbers
Code: "histo_h1d.py". Programming language: Python
DMelt Version 1.4. Last modified: 09/01/1972. License: Pro
https://datamelt.org/code/cache/histo_h1d_5266.py
To run this script using the DMelt IDE,
copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.
from java.util import Random
from jhplot import H1D,HPlot
h1 = H1D("1D Histogram",12,-2, 2 )
rand = Random()
for i in range(3000):
h1.fill(rand.nextGaussian())
c1 = HPlot()
c1.setGrid(0,True)
c1.setGrid(1,True)
c1.visible(1)
c1.setAutoRange()
h1.setFill(1)
c1.draw(h1)
You see the box below because you did not login.