Key Takeaways: Theming and Branding
-
Style is a system, not a one-off. The chapter's threshold concept: a visualization brand is a codified system (colors, fonts, templates, helper modules) that makes consistency automatic rather than effortful. Build once, apply everywhere.
-
A style guide documents the rules. Colors, fonts, chart anatomy, encoding conventions, annotations, layout, accessibility, examples, do's/don'ts. The document serves as reference, training material, and specification for implementation.
-
A color system has multiple palettes. Primary/secondary/accent colors, plus categorical (for groups), sequential (for ordered values), diverging (for values with a meaningful midpoint), neutral (for backgrounds and grids). Different data types need different palettes.
-
matplotlib style sheets are
.mplstylefiles. Write rcParams values in a text file, install to matplotlib's config directory, apply withplt.style.use("name"). Compose with base styles:plt.style.use(["seaborn-paper", "mybrand"]). -
Plotly templates register in
pio.templates. Create ago.layout.Templatewith your settings, register withpio.templates["mybrand"] = template, set as default withpio.templates.default = "plotly_white+mybrand". The+operator composes templates. -
Helper modules encapsulate conventions. A Python module with
apply_brand(),branded_axes(),add_title(),add_source(),save_branded()functions. Authors invoke the helpers rather than remembering the rules. -
Adapt corporate brand guides. Extract colors, test colorblind safety, identify fonts, fill in chart-specific rules, build implementation, get design approval. The chart brand extends the corporate brand into a new medium.
-
Compliance can be automated. Write
validate_brand_compliance(fig)that checks font sizes, colors, backgrounds, and other rules. Run before publishing to catch drift. Optionally integrate into CI/CD. -
Packaging beats design. The BBC's bbplot succeeded because it packaged the style as a reusable library, not because the style itself was novel. Code beats prose for enforcing conventions. For your own brand, encode the rules as software.
-
Brands evolve. Version the style sheet. Provide migration paths when updating. Document changes. Solicit feedback. A brand system is infrastructure that must be maintained, not a monument that stays static.
With Chapter 32 complete, the technical and systematic foundations of visualization production are in place. Chapter 33 integrates everything in the book into an 8-step workflow from analytical question to published chart, providing a process framework that ties together perception (Part I), design (Part II), code (Parts III-V), specialized techniques (Part VI), and production (Part VII).