Scientific Python 101: Matplotlib


Welcome to the second part of our scientific python series, this time we're looking at the wonderful plotting library matplotlib.  There are incredibly many types of visualisations available, for a full reference check out the documentation here.  Today we're going to go through the most common types of plots you'll use to explore and explain your data.  At the end you'll get the chance to try it out yourself in the exercises!


  1.  Make a histogram containing 2000 random numbers from a normal distribution mean 5, sigma 2.  Change the binning to display more bins and make sure the mean is not at a bin boundary.
  2.  Make a line plot of y=x**3.  Label the axes and change the colour of the line.
  3.  Make either a pcolormesh or a contour plot of z=x**2 + y.  Investigate what colour schemes are available here and change to the one you prefer.
Abbey Waldron