nice-figures

A scientific & blog plotting library built for AI agents. It teaches an agent to generate matplotlib figures in a soft-pastel, research-blog visual register — the kind of plot you see in modern ML/alignment write-ups. Bold sans-serif display titles, scatter overlaid with smoothed trends and shaded confidence bands, signature rounded bars, minimal axes, and ↓better badges. White background by default, so the output is conference- and paper-ready (PDFs embed Type 42 fonts, so they pass IEEE/ACM/NeurIPS font checkers).
Why agent-first matters in practice:
- Recipes, not docs. 16 copy-paste-runnable chart archetypes — every code block is executed in CI, so what the agent copies is never stale.
- A self-verification loop. The skill instructs the agent to render the PNG, look at it, and fix what it sees (legend collisions, unlabeled series, clipped bars) before delivering — the failure modes that "code ran fine" never catches.
- Opinionated defaults over choices. One style, tested helpers (
top_legend, plain_log_ticks, soft_colorbar, rounded_bars), and explicit common-mistakes lists, because agents do best when the right thing is the only documented thing.
For Claude Code it ships as a plugin with a skill that triggers automatically; any other agent (Codex, Cursor, …) can use it via AGENTS.md and pip install git+https://github.com/Mapika/nice-figures.
The style at a glance
Multi-panel training curves — scatter under a smoothed trend with a shaded band, minimal axes, and ↓better badges:

Grouped bars with the signature softly-rounded tops, in the warm coral/peach palette:

Kaplan/Chinchilla-style scaling laws — per-run loss curves colored by model size, tangent to the dashed compute-efficient frontier:

All three use synthetic placeholder data and are generated by assets/generate_showcase.py — run it to reproduce them.
Install
This repo is a Claude Code plugin marketplace. Add it, then install the plugin:
/plugin marketplace add Mapika/nice-figures
/plugin install nice-figures@nice-figures
To update later:
/plugin marketplace update nice-figures
Usage
Once installed, just describe the figure you want. Claude triggers the skill on requests like:
- "Make a training-curve plot of these RL scores with a smoothed trend and a shaded band, soft research-blog style."
- "Grouped bar chart comparing three models across four eval scenarios, with the rounded bar tops and error bars."
- "Scaling-law scatter on log-log axes with a power-law fit for our poster — clean white background."
- "Match the figure you made last week with the coral/peach bars."
You can also invoke it directly:
/nice-figures:nice-figures
Bring your own data (CSV or arrays) and Claude maps it onto the nearest recipe; describe a figure with no data and it generates a clearly-marked synthetic placeholder.
Other agents / plain Python
The style helper is a single dependency-light module, installable anywhere:
pip install git+https://github.com/Mapika/nice-figures
python -c "import soft_style"
AGENTS.md carries the agent-agnostic instructions (workflow, hard rules, the render-and-inspect loop) — point Codex/Cursor/your harness at the repo and it works without the Claude plugin machinery.
What's inside
AGENTS.md # agent-agnostic instructions (non-Claude harnesses)
plugins/nice-figures/skills/nice-figures/
├── SKILL.md # the skill: when to use it, conventions, gotchas
├── scripts/soft_style.py # matplotlib style helpers (numpy + matplotlib only)
└── references/chart_recipes.md # full code for all 16 chart archetypes
tests/ # unit tests + every recipe executed end-to-end
The style