Lecture 6: Visualisation#

Today we’ll be introducing the matplotlib package. matplotlib is a powerful tool, capable of producing publication quality figures in both 2D and 3D. For more information on matplotlib, including tutorials, visit https://matplotlib.org/. A comprehensive gallery of the possible plots you can produce with matplotlib is available at https://matplotlib.org/stable/gallery/index.html.

In this lecture, we’ll be covering the basics of creating 2D graphs and images using the matplotlib package. These skills will be crucial in presenting work to others, and will be tested in both courseworks… This also provides you a means to create any plots you might need to produce in your 3rd- or 4th-year project!

In papers/reports we commonly see presentational problems in plots/graphs such as:

  • font size is small

  • font type is ugly

  • tick size is small

  • lines are too thin

  • colours unsuitable for people who are colour blind

  • ugly legend formatting

Using matplotlib, you have complete control over all of these!

The weekly tasks are split up into a series of sequential notebooks. Any of these can be opened below by clicking on them. To open any of the notebooks interactively, first click on the section, then click on the rocket and select “Colab”.

Weekly tasks#