13.20 Figure export, size, format, and accessibility
EDA writes print figures under plots/ and embeds web-theme figures in report.html. The same statistical content can become unreadable when exported at the wrong dimensions, resolution, or format.
Format and resolution
--plot-format png|svg|both controls standalone output. PNG is raster and uses --plot-dpi; SVG is vector and remains editable/scalable. --no-svg suppresses SVG even when general format settings would request it, but asking for SVG-only together with --no-svg is an error. --no-plots suppresses standalone drawing while configured report/table behavior remains governed separately.
Width/height default to 7 × 5 inches, units can be inches, cm, mm, or px, DPI defaults to 300, and base font size defaults to 11 pt. Multi-panel grids may expand to fit panels rather than obeying single-panel dimensions exactly.
Titles, legends, captions, colors
--plot-no-title, --plot-no-legend, and --no-caption remove elements. Do so only when the surrounding document supplies equivalent context. Captions often record scale, statistic, omitted values, date, or selection. Removing them can remove interpretation evidence.
Colors use a fixed accessible palette for common grouping, but no palette rescues too many categories. Verify color contrast, grayscale/print behavior, and that meaning is not conveyed by color alone. Legends and facet labels should include units and unambiguous group values.
Before release, open the actual exported PNG and SVG rather than judging only the HTML report. Check that long labels are not clipped, panel text remains readable at final physical size, raster lines are sharp, and SVG fonts render on a second machine. Visual QA is part of reproducible output validation.
Common mistakes
- Increasing DPI without increasing readability or physical size.
- Editing SVG text/numbers manually after generation.
- Removing captions that document exclusions/statistics.
- Publishing screenshots instead of reproducible source figures.
Checklist
- Choose physical size for the final medium.
- Prefer SVG for editing and PNG for fixed raster delivery.
- Preserve captions and provenance.
- Check contrast, fonts, legends, and grayscale.
- Regenerate rather than hand-alter scientific content.
Further reading
See Chapter 10 figure pipeline, SVG preservation, and PNG resolution.