00:00 AM
00:00 AM

To get the most out of the tutorials, you will need to have the correct software installed and running. Specific requirements for each tutorial are specified in the detailed description for each tutorial. But it's best to start with one of the scientific Python distributions to ensure an environment that includes most of the packages you'll need.

Anatomy of Matplotlib

Benjamin Root -


Part 1

Part 2

Part 3


Benjamin Root
Ben Root is a member of the matplotlib development team. Main areas of development are the documentation and the mplot3d toolkit. Ben is also an active member of the mailing lists and has been using that experience in helping newcomers understand matplotlib to improve the documentation. Ben is a Meteorology graduate student who has nearly completed his PhD and has recently started working for a research company which has adopted Python as the preferred programming language. Part of his responsibilities in his new job is to help transition co-workers over to the Python toolset.


This tutorial will be the introduction to matplotlib, intended for users who want to become familiar with python's predominate scientific plotting package. First, the plotting functions that are available will be introduced so users will know what kinds of graphs can be done. We will then cover the fundamental concepts and terminologies, starting from the figure object down to the artists. In an organized and logical fashion, the components of a matplotlib figure are introduced, such as the axes, axis, tickers, and labels. We will explain what an Artist is for, as well as explain the purpose behind Collections. Finally, we will take an overview of the major toolkits available to use, particularly AxesGrid, mplot3d and basemap.




  • Purpose of matplotlib
  • Online Documentation
    • Examples Page
    • Gallery Page
    • FAQs
    • API documentation
  • Mailing Lists
  • Github Repository
  • Bug Reports & Feature Requests

What is this "backend" thing I keep hearing about?

Plotting Functions

  • Graphs (plot, scatter, bar, stem, etc.)
  • Images (imshow, pcolor, pcolormesh, contour[f], etc.)
  • Lesser Knowns: (pie, acorr, hexbin, etc.)
  • Brand New: streamplot()

What goes in a Figure?

  • Axes
  • Axis
  • ticks (and ticklines and ticklabels) (both major & minor)
  • axis labels
  • axes title
  • figure suptitle
  • axis spines
  • colorbars (and the oddities thereof)
  • axis scale
  • axis gridlines
  • legend

(Throughout the aforementioned section, I will be guiding audience members through the creation and manipulation of each of these components to produce a fully customized graph)

Introducing matplotlibrc

  • Hands-On: Have users try making some changes to the settings and see how a resulting figure changes

What is an Artist?

  • Hands-On: Have audience members create some and see if they can get them displayed

What is a Collection?

  • Hands-On: Have audience members create some, manipulate the properties and display them


  • color (and edgecolor, linecolor, facecolor, etc...)
  • linewidth and edgewidth and markeredgewidth (and the oddity that happens in errorbar())
  • linestyle
  • zorder
  • visible

What are toolkits?

  • axes_grid1
  • mplot3d
  • basemap

Required Packages


Matplotlib (version 1.2.1 or later is preferred, but earlier version should still be sufficient for most of the tutorial)

ipython v0.13