Further Reading: Customization Mastery
Tier 1: Essential Reading
The matplotlib Customization and Configuration Tutorial. matplotlib.org/stable/users/explain/customizing.html The official matplotlib tutorial on customization. Covers rcParams, style sheets, and the configuration mechanism in depth. Essential reading for understanding how matplotlib's global state works and how to override it systematically. Updated with each matplotlib release, so always current with the latest features.
The BBC R Cookbook. bbc.github.io/rcookbook/
The BBC Visual and Data Journalism team's publicly shared recipe book for producing BBC-quality charts using ggplot2 and the bbplot package. The tool is R, not matplotlib, but the design principles and specific recipes transfer directly. Essential reading for understanding how institutional style systems work in practice, as discussed in Case Study 1.
VanderPlas, Jake. Python Data Science Handbook. 2nd ed. O'Reilly Media, 2023. Already recommended in previous chapters, VanderPlas's book includes extensive coverage of matplotlib customization in Chapter 4. The sections on "Customizing Plot Legends," "Customizing Colorbars," "Customizing Ticks," and "Customizing Matplotlib: Configurations and Stylesheets" are directly relevant to this chapter. Freely available at jakevdp.github.io/PythonDataScienceHandbook/.
Tier 2: Recommended Specialized Sources
van der Walt, Stéfan, and Nathaniel Smith. "A Better Default Colormap for Matplotlib." SciPy 2015 talk. The presentation that introduced viridis as a perceptually uniform colormap and successfully argued for making it matplotlib's default. The talk is available on YouTube and is worth watching for the specific argument about why jet (and rainbow colormaps generally) are perceptually broken, and why a carefully-designed alternative is better. The work led directly to the matplotlib 2.0 release discussed in Case Study 2.
Crameri, Fabio. "Scientific colour maps." Zenodo, 2023. doi.org/10.5281/zenodo.1243862 A comprehensive collection of perceptually uniform scientific colormaps, with explanations of why each is designed the way it is. Crameri's colormaps (batlow, vik, lajolla, etc.) are used by many scientific journals and are worth using as alternatives to matplotlib's defaults for scientific work. Freely available and widely cited in scientific visualization.
Rougier, Nicolas P. Scientific Visualization: Python + Matplotlib. Self-published, 2021. Already recommended in earlier chapters, Rougier's book goes deeper into matplotlib's customization than most tutorials. The chapters on rcParams, style sheets, and Artist-level manipulation are particularly useful for Chapter 12 material. Freely available at github.com/rougier/scientific-visualization-book.
Knaflic, Cole Nussbaumer. Storytelling with Data: A Data Visualization Guide for Business Professionals. Wiley, 2015. Already recommended for Chapter 7, Knaflic's book is also relevant to customization because her specific recommendations — action titles, careful use of color, removal of chart-junk — translate directly to matplotlib code. The book is not a matplotlib tutorial, but it gives you the design rationale that matplotlib customization should implement.
Wong, Dona M. The Wall Street Journal Guide to Information Graphics. W.W. Norton, 2010. Already recommended for Chapter 7, Wong's practical guide to chart design includes specific recommendations for fonts, numbers, spacing, and typography that you can implement through matplotlib's text and tick_params methods.
Wilke, Claus O. Fundamentals of Data Visualization. O'Reilly Media, 2019. Wilke's chapters on color and the design of specific chart types are directly applicable to matplotlib customization decisions. His R/ggplot2 examples translate cleanly to matplotlib. Freely available at clauswilke.com/dataviz.
McKinney, Wes. Python for Data Analysis. 3rd ed. O'Reilly Media, 2022. Already recommended for Chapter 10, McKinney's pandas book includes the relevant sections on how to customize pandas plot methods, which use matplotlib under the hood. Useful for understanding how to apply your matplotlib style system to pandas-produced charts.
Tier 3: Style Sheets, Reference Galleries, and Examples
| Resource | URL / Source | Description |
|---|---|---|
| matplotlib Gallery | matplotlib.org/stable/gallery/ | The official matplotlib gallery. Filter by "API examples" and "Showcase" for customization-heavy examples. Every example has full source code you can copy and modify. |
| matplotlib rcParams reference | matplotlib.org/stable/tutorials/introductory/customizing.html | The comprehensive list of every rcParams setting, with descriptions and default values. Use as a reference when building your own .mplstyle file. |
| matplotlib built-in style sheets | matplotlib.org/stable/gallery/style_sheets/style_sheets_reference.html | A visual reference showing every built-in matplotlib style sheet applied to the same set of charts. Useful for deciding which built-in style is closest to what you want. |
| The dufte style file | github.com/nschloe/dufte | A Tufte-inspired matplotlib style file developed by Nico Schlömer. Clean, minimal, and publicly available. Worth studying as an example of a minimalist house style. |
| The seaborn style mechanism | seaborn.pydata.org/tutorial/aesthetics.html | seaborn's theme system is built on top of matplotlib's rcParams and provides a higher-level API for common customizations. Many matplotlib users borrow seaborn themes as a starting point for their own customization. |
| colorbrewer2.org | colorbrewer2.org | Cynthia Brewer's classic tool for selecting colorblind-safe color schemes for cartography and data visualization. The palettes are available in matplotlib via cmap="Set2", cmap="RdBu", etc. |
| Coolors | coolors.co | A general-purpose palette generator useful for brand color selection. Export hex codes and use them in your matplotlib style. |
| Inter font | rsms.me/inter/ | A high-quality open-source sans-serif font designed for screen use. Popular among data journalists for matplotlib chart typography. Free download. |
| IBM Plex fonts | github.com/IBM/plex | Another high-quality open-source font family from IBM, including sans-serif, serif, and monospace variants. Popular for technical documentation and data visualization. |
| Google Fonts | fonts.google.com | A large library of free fonts suitable for data visualization. Filter by "sans-serif" and "latin" for the most useful categories. |
| Source Sans Pro | github.com/adobe-fonts/source-sans | Adobe's open-source sans-serif font, widely used in data visualization. Similar in spirit to Inter. Free download. |
Notes on Building Your Own Style System
Building a personal matplotlib style system is a gradual process. A reasonable path:
Week 1: Override the most obvious defaults. Remove the top and right spines from every chart. Lighten the gridlines. Use a specific color instead of default blue. Even without a formal style file, these changes improve every chart you produce.
Week 2-3: Create your first .mplstyle file with 10-15 rcParams settings. Test it on several charts. Iterate based on what you see.
Month 1: Write a reusable style function (apply_clean_style(ax)) that encapsulates any customization you cannot express through rcParams alone. Use it on every chart.
Month 2-3: Build a second style function for a specific alternative context (e.g., slide deck, academic paper). Use context managers to switch between them.
Month 6: Your style system should feel like the default way you work. Producing a decluttered, action-titled, properly-formatted chart should take no more effort than producing a raw exploratory one, because the defaults do most of the work.
Year 1+: Revisit and update. Your style preferences will evolve. The matplotlib ecosystem will update. Keep your style current with periodic reviews.
The payoff of a style system is not a single impressive chart. It is the cumulative effect of producing many consistently good charts with minimal per-chart effort. Over a year of regular chart production, the time saved by having a good style system is substantial, and the quality improvement is visible to your audience even when they cannot articulate why.
A note on reading order: If you want one additional source, read the matplotlib customization tutorial (the official one) and then the BBC R Cookbook. Together they give you both the matplotlib-specific mechanics and an example of a real institutional style system. For the design rationale behind your choices, keep Knaflic and Wilke on your desk as references. For fonts and colors, bookmark Google Fonts and ColorBrewer. The investment pays back many times over as your chart production scales.