Website currently under reconstruction

Welcome to MESA

The MacDiarmid Emerging Scientists Association (MESA) was formed in 2010 to expand the opportunities available to MacDiarmid Institute PhD students and postdoctoral researchers. It works to improve networking among them and establish a sense of community.

Read More About Us

Find MESA Events

Find information about our upcoming and current events here:

Our latest events

Access Our Resources

Access our collection of tutorials, seminars and other resources

Start Browsing our Collection

Get In touch

+64 4 463 5233 ext. 8910



Learn more about our current committee here:

Current Committee

5. Labelling and saving your first Python plot

Labelling and saving your first Python plot


The last tutorial covered how to load a dataset into your python session and then plot it using the matplotlib.pyplot (pylab) plotting package. Well done if you have gotten this far! This screencast will show you how to label axes, add a grid to your plot,¬† configure the visible data range on the x and y axis and, of course how to save your very first plot in Python. New commands in this screencast include: pylab.xlim, pylab.ylim, pylab.xlabel, pylab.title, pylab.savefig and pylab.grid. Look them up in the help menu within the terminal by adding a ‘?’ after the command or look up a more detailed tutorial on the matplotlib.pylplot web page.

Other sites with useful information include this site which has a step-by-step pictorial tutorial on a similar example to what I have covered in this tutorial and the last one. The site also has a small cheat sheet on the shortcuts for line, colour and marker styles. For those wanting to add errorbars to their data see this wonderful post.


Unable to display content. Adobe Flash is required.

Post contributed by Shrividya Ravi, VUW

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>