Skip to main content

15.1) Plotting


Python has several packages that enable you to plot scientific results. The most popular is matplotlib. The package is based on the MATLAB plotting system, so MATLAB users will find the commands very familiar. It produces publication quality plots that look great and in conjunction with Basemap, it allows you to plot contour plots on maps.

Have a look at the gallery of examples of plots and maps.

There are other packages that allow you to use other software packages directly from Python and some of those give you great plotting capabilities. Have a look at the list of recommended packages in the Additional Resources.

This section will only introduce the basic use of matplotlib. In particular:

  • plotting one dimensional data (x-y line or scatter pots)
  • adjusting color and labels
  • saving plots

Once you’re done with this tutorial I recommend you try the official matplotlib tutorial.