Mark Lacy

NRAO, Charlottesville

Last updated:

October 2, 2009

Contact Information

520 Edgemont Road
VA 22903


mlacy at nrao stop edu

Useful links

Plotting in Python - a very rough guide

Matplotlib is the main plotting library for python, available at sourceforge . Documentation also resides here, along with a wide range of examples. Below are two specific examples (I'm sure there are better ways of doing many of these operations but at least I've tested these and they work!):

a simple non-interactive example

an example using the interactive pyplot environment

Google is also a very useful resource for finding obscure patches, related information and other examples.

APLpy is a package than can make "astronomically useful" plots as it is able to deal with World Coordinate Systems (WCS), written by the applied physics lab at JHU. Unfortunately it does require some work to install as it needs the numpy, matplotlib, pyfits and pywcs libraries (see the APLpy install page for links and details), and there are also some version dependencies. Nevertheless it is a very powerful package. Here is a simple demo that illustrates some basic features.

This tar file contains the scripts and data files for this set of examples.

site info

© 2008 Mark Lacy | Original design by Andreas Viklund.