Adaptive histograms (bins adjusted at run time)
Code: "histo_adaptive.py". Programming language: Python
DMelt Version 1.8. Last modified: 03/03/2021. License: Pro
https://datamelt.org/code/cache/histo_adaptive_8334.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.
"""
This class implements a histogram that adapts to an unknown data distribution.
Look at the H1DA class
You will need to convert it to P1D to show it
"""
from java.awt import Color,Font
from java.util import Random
from jhplot import H1DA
h1 = H1DA()
rand = Random()
for i in range(1000):
h1.fill(rand.nextGaussian())
print h1.toString()
You see the box below because you did not login.