Contribute Media
A thank you to everyone who makes this possible: Read More

Anatomy of Matplotlib, SciPy2013 Tutorial, Part 1 of 3

Summary

Presenter: Benjamin Root

Description

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.

Outline

Outline:

Introduction

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 Properties:

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

NumPy

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

ipython v0.13

Documentation

https://dl.dropbox.com/u/7325604/AnatomyOfMatplotlib.ipynb

Details

Improve this page