hist(x, bins=10, ax=None, max_bins=100000.0, **kwargs)¶
Enhanced histogram function
This is a histogram function that enables the use of more sophisticated algorithms for determining bins. Aside from the
binsargument allowing a string specified how bins are computed, the parameters are the same as pylab.hist().
This function was ported from astroML: https://www.astroml.org/
array of data to be histogrammed
If bins is a string, then it must be one of:
‘blocks’ : use bayesian blocks for dynamic bin widths
‘knuth’ : use Knuth’s rule to determine bins
‘scott’ : use Scott’s rule to determine bins
‘freedman’ : use the Freedman-Diaconis rule to determine bins
Specify the Axes on which to draw the histogram. If not specified, then the current active axes will be used.
Maximum number of bins allowed. With more than a few thousand bins the performance of matplotlib will not be great. If the number of bins is large and the number of input data points is large then the it will take a very long time to compute the histogram.
other keyword arguments are described in
Return values are the same as for