Toggle Navigation
Everything
Blog posts
Pages
Home
About
The Author
The Book
This Website
Book
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plotting with pylab
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and IPython Notebook
Examples
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: General Scientific Programming
Examples
Questions
Problems
Errata
Book (2nd ed.)
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plots and Charts
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and Jupyter Notebook
Examples
Problems
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: Data Analysis with pandas
Examples
Problems
Chapter 10: General Scientific Programming
Examples
Questions
Problems
Errata
Additional Notes
Blog
Apps
Contact
Home
Book (2nd ed.)
Chapter 7: Matplotlib
Examples
Examples
E7.1 A scatter plot of demographic data
E7.2 Median age at first marriage in the US over time
E7.3 Population changes in five US cities
E7.4 Lifetimes of an exponential decay
E7.5 Tick mark customization
E7.6 Fledging bird weights
E7.7 The one-dimensional diffusion equation
E7.8 Ganged subplots
E7.9 Letter frequencies in Moby Dick
E7.10 Renewable energy in Germany
E7.11 A pie chart of greenhouse gas emissions
E7.12 Modelling an antenna array
E7.13 Arrow styles
E7.14 An annotated plot of a share price
E7.15 Using ax.vlines and ax.hlines
E7.16 A depiction of the electromagnetic spectrum
E7.17 BMI data with confidence ellipses
E7.18 Some colourful shapes
E7.19 Electrostatic potential of an electric dipole
E7.20 A simple contour plot
E7.21 Visualizing a matrix with imshow
E7.22 The Barnsley fern
E7.23 A heatmap of Boston temperatures
E7.24 The two-dimensional diffusion equation
E7.25 Simple surface plots
E7.26 A torus
E7.27 Depicting a helix
E7.28 Animating a decaying sine curve 1
E7.29 Animating a decaying sine curve 2: blitting
E7.30 Animating a bouncing ball