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
Chapter 7: Matplotlib
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
Questions
Q7.4.1 Plotting on a log scale
Q7.4.2 A horizontal bar chart
Q7.5.1 The two-dimensional sinc function
Q7.5.2 A heatmap of birthday dates
Problems
P7.4
P7.4.1 The Big Mac index
P7.4.2 West Nile Virus disease statistics
P7.4.3 BMI variation with of GDP
P7.4.4 Atmospheric carbon dioxide concentrations
P7.4.5 The Planck function
P7.4.6 A circular pattern
P7.5
P7.5.1 The Chaos Game
P7.5.2 BMI contours
P7.5.3 The two-dimensional advection equation
P7.5.4 The Julia set
P7.5.5 The effect of sea-level rise on Great Britain
P7.7
P7.7.1 Animating a pendulum
P7.7.2 Animation of the diffusion equation
P7.7.3 The Voyager 2 space probe trajectory