13A.21 Themes, palettes, export, and accessibility
Four themes are available: classic, bw, minimal, and gray. Themes change framing and grids, not data. Palettes include okabe-ito (default), tableau, set1, dark2, pastel, viridis, grey, blues, heat, and bluered, plus explicit colour lists or LEVEL=COLOUR mappings.
Okabe-Ito and viridis are strong defaults for colour-vision accessibility. Pastel may fail on white backgrounds, and red/green contrasts should not be the only encoding. Pair colour with shape, linetype, labels, or facets when group identification is important.
Physical export
--plot-width, --plot-height, and --plot-units in|cm|mm|px define dimensions; DPI controls PNG resolution, and base size controls typography. --plot-format png|svg|both selects formats; --svg adds vector output. SVG is excellent for line art and editing; PNG is predictable for embedding. Review both at intended physical size.
The gallery uses 9×6 inches, 120 DPI for repository-efficient evidence, base size 11, and both formats. Production manuscripts may require 300 DPI or publisher-specific dimensions.
Accessibility review
Titles, axis labels, units, legend titles, captions, and readable font size are part of correctness. Avoid encoding a category only by colour. Check clipping, crowded facets, long labels, gray-scale conversion, and contrast. Preserve provenance even if a visual caption is removed.
The base-size setting is expressed in points, while the canvas has physical dimensions. Increasing only canvas width can make text appear relatively smaller when the figure is placed into a fixed report column. Render a representative page or manuscript layout and inspect it at 100% scale before freezing export defaults.
Common mistakes
- Increasing DPI without defining physical dimensions.
- Using colour alone for critical distinctions.
- Selecting a palette for aesthetics rather than meaning.
- Reviewing only a zoomed browser view.
Checklist
- Export at final physical size.
- Test colour-vision and grayscale readability.
- Include units and meaningful legend titles.
- Inspect PNG and SVG for clipping.
- Preserve provenance outside optional captions.
Further reading
See Chapter 10's publication figure pipeline, aesthetics, output bundle, and validation.