figura
Publication-quality figures, plots, and diagrams for academic papers — render → view → fix until print-size defects are gone 🧪
Introduction
figura enables you to produce paper-ready figures, plots, and diagrams without falling into the "default matplotlib" or "default TikZ" look that gives away a rushed submission.
It ships as a Claude Code plugin: an auto-triggering skill plus six slash commands that run the same render → view → fix loop on every figure. The skill knows how to inspect a rendered PNG at print resolution, find user-visible defects, and apply standard fixes from a defect catalog — capped at two cycles so you don't chase pixels. Image audits are delegated to a dedicated subagent so the main thread doesn't absorb image bytes.
Two backends sit behind one workflow: matplotlib (.py) for data plots and TikZ / LaTeX (.tex) for diagrams that match a paper's body typography. Same Okabe-Ito colorblind-safe palette, same Helvetica defaults, same export pipeline.
Features
- Render → view → fix loop, capped at two cycles. First-pass renders almost always have at least one user-visible defect (small fonts, legend overlap, tick collision, arrow-through-text). The plugin views the rendered PNG at 300 DPI scaled to print size, names defects from a catalog, and applies standard fixes.
- matplotlib pipeline that matches Nature / NeurIPS / IEEE house style. Embedded TrueType fonts (
pdf.fonttype = 42), Helvetica + stixsans math, top/right spines off, Okabe-Ito categorical palette, perceptually uniform colormaps, print-size figure dimensions. export.save() emits PDF + SVG + PNG atomically.
- TikZ standalone diagrams that drop straight into a LaTeX paper.
\documentclass[tikz,border=4pt]{standalone}, the same Okabe-Ito hex codes as the matplotlib palette, reusable stage / decision / io styles, build helper that compiles to PDF and a 300 DPI PNG preview for the iteration loop.
- Defect catalog covering both backends. matplotlib: tick collisions, legend covering data, multi-panel cramping, panel labels clipped. TikZ: arrow-through-diamond-text, loop-arrow-crossing-rows, label-on-top-of-node — each with copy-paste fix snippets.
- Six slash commands.
/figura:iterate, /figura:beautify, /figura:fix-overlap dispatch on extension (.py → matplotlib, .tex → TikZ). /figura:paper-style <venue> <script> switches a script to a venue's font/spacing (NeurIPS, ICML, ICLR, IEEE, CVPR, ACM, Nature). /figura:export-png-bundle <dir> bulk-renders every PDF in a directory to PNG@300dpi for board uploads / README embeds / slide decks. /figura:analyze-image <image> is a read-only visual audit that delegates to a figura-image-auditor subagent — defect table comes back without filling the main context with image bytes.
- Six-category defect taxonomy. Legibility, collision, truncation, encoding, layout, and dynamic-range / axis-scaling (the most-hit class on real papers — outlier dominates axis, decay-to-zero curve with mostly post-convergence flatline, multi-modal density spanning orders of magnitude).
Usage
The fastest path is the Claude Code marketplace. Inside Claude Code:
/plugin marketplace add chrischoy/figura
/plugin install figura@figura
/reload-plugins
Then, in any project:
Make a publication-quality 3D plot of a torus
Claude renders figures/fig_torus.{pdf,svg,png}, views the PNG, and verifies legibility at print size before declaring the figure done. The matching script lives at skills/figura/examples/torus.py.
For a TikZ diagram:
Make a TikZ flowchart of an encoder → decoder pipeline
figures/<name>.{pdf,png} (and .svg if pdf2svg is installed). Template: skills/figura/examples/diagram_flow.tex.