Further Reading: Specialized matplotlib Charts
Tier 1: Essential Reading
The matplotlib Gallery — Images, Contours, and Fields section. matplotlib.org/stable/gallery/images_contours_and_fields/ The gallery section dedicated to specialized 2D visualizations. Examples cover imshow, pcolormesh, contour, contourf, quiver, streamplot, and more. Each has full source code. The first stop for any specialized chart type you need to produce.
The matplotlib Gallery — Statistics section. matplotlib.org/stable/gallery/statistics/ The gallery section covering error bars, confidence bands, box plots, violin plots, and other statistical chart types. Useful for seeing how errorbar and fill_between are used in practice.
VanderPlas, Jake. Python Data Science Handbook. 2nd ed. O'Reilly Media, 2023. Chapter 4 of VanderPlas's book includes sections on "Density and Contour Plots," "Visualizing Errors," and "Customizing Colorbars" that directly complement this chapter. Free online at jakevdp.github.io/PythonDataScienceHandbook/.
Tier 2: Recommended Specialized Sources
Wilke, Claus O. Fundamentals of Data Visualization. O'Reilly Media, 2019. Wilke's chapters on "Visualizing distributions," "Visualizing proportions," and "Visualizing uncertainty" cover the design principles behind the specialized chart types. His R/ggplot2 examples translate cleanly to matplotlib. Freely available at clauswilke.com/dataviz.
Crameri, Fabio. "Scientific colour maps." Zenodo, 2023. doi.org/10.5281/zenodo.1243862 A scientific colormap library designed specifically for perceptual uniformity and colorblind safety. Many of Crameri's colormaps are now included in matplotlib. Read the associated papers for the design rationale behind perceptually uniform colormaps.
IPCC AR6 Working Group I Report. "Climate Change 2021: The Physical Science Basis." ipcc.ch/report/ar6/wg1/ The figures in the IPCC AR6 report are canonical examples of scientific uncertainty visualization. Browse the figures to see patterns for error bands, scenario visualization, and multi-panel climate figures. The report is freely available.
Rougier, Nicolas P. Scientific Visualization: Python + Matplotlib. Self-published, 2021. Already recommended, Rougier's book covers specialized chart types in the context of scientific publication. The chapters on heatmaps, contour plots, and uncertainty visualization are directly relevant. Freely available at github.com/rougier/scientific-visualization-book.
Tufte, Edward R. Visual Explanations: Images and Quantities, Evidence and Narrative. Graphics Press, 1997. Tufte's third book includes discussion of uncertainty visualization and multi-dimensional encoding. While not matplotlib-specific, the design principles apply directly to the specialized chart types in this chapter.
Cleveland, William S. Visualizing Data. Hobart Press, 1993. The classic empirical work on graphical perception includes extensive coverage of contour plots, 2D displays, and the perceptual accuracy of different chart types. Cleveland's taxonomy informs many of the modern chart type recommendations.
Tier 3: Tools, References, and Specific Chart Types
| Resource | URL / Source | Description |
|---|---|---|
| matplotlib Colormaps Reference | matplotlib.org/stable/tutorials/colors/colormaps.html | The comprehensive list of built-in matplotlib colormaps with visual examples. Use to browse for the right colormap for your data. |
| Choosing Colormaps (matplotlib) | matplotlib.org/stable/tutorials/colors/colormaps.html | The official guide to choosing colormaps, covering perceptually uniform sequences, diverging colormaps, qualitative colormaps, and the infamous "rainbow colormap" problem. |
| ColorBrewer | colorbrewer2.org | Cynthia Brewer's tool for selecting colorblind-safe color schemes. Many of matplotlib's diverging colormaps (RdBu, BrBG, PuOr) come from ColorBrewer. |
| seaborn heatmap | seaborn.pydata.org/generated/seaborn.heatmap.html | seaborn's high-level heatmap function, which automates many of the customizations from this chapter (including annotation and colorbar positioning). Useful as an alternative to raw matplotlib for correlation matrices and confusion matrices. |
| The Python Graph Gallery — Heatmap section | python-graph-gallery.com/heatmap/ | Heatmap examples in matplotlib and seaborn with source code. |
| The Python Graph Gallery — Contour section | python-graph-gallery.com/2d-density-plot/ | Contour and 2D density plot examples. |
| cartopy for geographic data | scitools.org.uk/cartopy/docs/latest/ | For map-based visualizations (contour plots over geographic regions, heatmaps with geographic coordinates). Covered in Chapter 23. |
| scipy.stats.gaussian_kde | docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html | For computing 2D density estimates that can be visualized with contourf. |
| pyvista for 3D visualization | docs.pyvista.org | For genuinely 3D data (not the 3D bar charts Chapter 4 warns against). A matplotlib complement for scientific visualization. |
| matplotlib's Axes3D | matplotlib.org/stable/gallery/mplot3d/ | matplotlib's built-in 3D plotting (surface plots, 3D scatter, 3D lines). Useful for some scientific applications. Not covered in this chapter because 3D charts are usually the wrong choice for quantitative communication. |
A note on reading order: If you want one additional source, browse the matplotlib gallery's "Images, Contours, and Fields" section for examples. For the design rationale, read Wilke's chapter on visualizing uncertainty. For real-world scientific examples, read a few IPCC AR6 figures and notice how they use uncertainty bands and scenario colors. Practice is more valuable than theory for these specialized types — produce your own heatmap, contour plot, polar plot, and errorbar chart, and the patterns will become familiar.