Installing matplotlib

We'll use matplotlib in this course for generating data visualizations. Installing it directly can be a bit of a hassle because it has a number of dependencies. Instead, we'll install a commercial collection of Python add-ons from a company called Enthought.

  1. Go to:

    and click on the "Request Academic License" link at the bottom. Then follow the instructions to download and install the software.

  2. Fill out the registration infor with your Middlebury e-mail, then wait for the e-mail and activate your account.
  3. Once your account is activated, click on the "Download Canopy Express for free" and download things.
  4. Wait for the download and install canopy (click on the downloaded .dmg file and then drag and drop canopy into your application folder).

For this lab, if you're working on your own laptop, we'll be using the Canopy editor. Matplotlib can be used with Wing and python in general, however, it's a pain to install, so we'll just do it this way for now.

Start up Canopy. Once it's up and running, click on the "Editor" option. What opens should look fairly similar to Wing. On the left is a file brower. In the upper right is the file editing windonw and in the bottom right is the interactive shell. The Canopy editor works more or less like the Wing editor.

To make sure everything is installed correctly, create a new file and then copy and paste the code from Wednesday class into this new file. Run it (using the green run arrow) and then call one of the functions (e.g. fancy_multiple_plot) in the shell window in the bottom right. You should see the graph pop up.

If you have problems, come see myself or Colby.