This documentation is for astroML version 0.2

This page

Links

astroML Mailing List

GitHub Issue Tracker

Videos

Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)

Citing

If you use the software, please consider citing astroML.

11.1.1.1. astroML.plotting.hist

astroML.plotting.hist(x, bins=10, range=None, *args, **kwargs)

Enhanced histogram

This is a histogram function that enables the use of more sophisticated algorithms for determining bins. Aside from the bins argument allowing a string specified how bins are computed, the parameters are the same as pylab.hist().

Parameters :

x : array_like

array of data to be histogrammed

bins : int or list or str (optional)

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

range : tuple or None (optional)

the minimum and maximum range for the histogram. If not specified, it will be (x.min(), x.max())

ax : Axes instance (optional)

specify the Axes on which to draw the histogram. If not specified, then the current active axes will be used.

**kwargs : :

other keyword arguments are described in pylab.hist().