Python_2  1.0
Variables
_04_histogram_demo Namespace Reference

A histogram displays numerical data by grouping data into "bins" of equal width. More...

Variables

 mu
 
 sigma
 
 x = mu + sigma * np.random.randn(10000)
 Holds a sample (or samples) from the “standard normal” distribution. More...
 
int n = 0
 Number of counts in each bin of the histogram. More...
 
 bins = None
 Left hand edge of each bin. More...
 
 patches = None
 The individual patches used to create the histogram, e.g a collection of rectangles. More...
 
 density
 
 True
 
 facecolor
 
 alpha
 
 y = norm.pdf(bins, mu, sigma)
 
 l = plt.plot(bins, y, 'r--', linewidth=1)
 

Detailed Description

A histogram displays numerical data by grouping data into "bins" of equal width.

Each bin is plotted as a bar whose height corresponds to how many data points are in that bin.

Author
Paulo Roma
Since
29/10/2016
See also
http://matplotlib.org/1.2.1/examples/pylab_examples/histogram_demo.html
https://numpy.org/doc/stable/reference/random/generated/numpy.random.randn.html
https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.pyplot.hist.html
https://www.khanacademy.org/math/statistics-probability/displaying-describing-data/quantitative-data-graphs/a/histograms-review
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.norm.html

Variable Documentation

◆ alpha

_04_histogram_demo.alpha

◆ bins

_04_histogram_demo.bins = None

Left hand edge of each bin.

◆ density

_04_histogram_demo.density

◆ facecolor

_04_histogram_demo.facecolor

◆ l

_04_histogram_demo.l = plt.plot(bins, y, 'r--', linewidth=1)

◆ mu

_04_histogram_demo.mu

◆ n

_04_histogram_demo.n = 0

Number of counts in each bin of the histogram.

◆ patches

_04_histogram_demo.patches = None

The individual patches used to create the histogram, e.g a collection of rectangles.

◆ sigma

_04_histogram_demo.sigma

◆ True

_04_histogram_demo.True

◆ x

_04_histogram_demo.x = mu + sigma * np.random.randn(10000)

Holds a sample (or samples) from the “standard normal” distribution.

◆ y

_04_histogram_demo.y = norm.pdf(bins, mu, sigma)