The automatic binning is implemented in Root when creating histograms
from Ntuples/trees. The algorithm used is a naive algorithm storing
the first few thousand entries into a buffer, then compute the min/max
, fill the histogram. This technique does not work well in case
of data not randomly distributed.
In the Hbook package, I implemented a different technique consisting
in buffering also the first entries, then doubling the bin size
in case of under/overflow. This technique had also problems and was
not appropriate in case of 2-d histograms. It could be implemented
in Root for 1-d histograms.
Rene Brun