UP | HOME

Exercise 24

Histograms

Define a variable y that contains 1000 values drawn from a gaussian distribution with mean 0.0 and standard deviation 1.0. Plot a histogram of y. For now just use the default settings for whatever function you find that produces a histogram.

e24plot1.jpg

Number of bins

Replot the histogram using 25 bins:

e24plot2.jpg

Bin width

Replot the histogram using a bin width of 0.20:

e24plot3.jpg

solutions


Paul Gribble | fall 2014
This work is licensed under a Creative Commons Attribution 4.0 International License
Creative Commons License