A Claude Code plugin that beautifies matplotlib scripts for scientific paper submission.
Given an existing .py plotting script, a target conference/journal, and the figure's fraction of column width on the page, the plugin renders the chart, inspects it critically, rewrites the visual system (figsize, fonts, linewidths, markers, ticks, legend weight), and re-renders to verify the result. It always renders before editing and again after editing — no code is rewritten from equations alone.
beautify-chart— the render → inspect → rewrite → re-render → verify loop. The skill looks up the venue's official author guidelines live (column width, body font size, required font family) and derives the target visual system from the figure's final physical width on the page, not from the current code values.
This is a Claude Code plugin. You need Claude Code already installed and working before installing the plugin.
Claude Code installs plugins from a marketplace, not directly from a GitHub URL. This repo ships its own single-plugin marketplace (see .claude-plugin/marketplace.json), so installation is two steps: add the marketplace, then install the plugin from it.
In a Claude Code session, run:
/plugin marketplace add preordinary/science-plot-formatter
/plugin install science-plot-formatter@science-plot-formatter
The first command registers this repo as a marketplace named science-plot-formatter. The second installs the plugin (also named science-plot-formatter) from that marketplace, which is why the @ form repeats the name.
If you are hacking on the plugin itself:
git clone https://github.com/preordinary/science-plot-formatter.gitThen in Claude Code:
/plugin marketplace add /absolute/path/to/science-plot-formatter
/plugin install science-plot-formatter@science-plot-formatter
Edits to skills/beautify-chart/ are picked up the next time the skill is invoked — no reinstall needed.
After installation, run /plugin in Claude Code and confirm science-plot-formatter appears in the list with the beautify-chart skill enabled. You can also ask Claude to "beautify a matplotlib script for NeurIPS" and check that the beautify-chart skill is invoked.
/plugin marketplace update science-plot-formatter # pull latest from GitHub
/plugin uninstall science-plot-formatter # remove the plugin
Ask Claude Code something like:
Beautify
path/to/plot.pyfor NeurIPS 2026. It's one full column wide.
The skill will:
- Look up NeurIPS 2026 author guidelines (column width, body pt).
- Render the script headlessly (
MPLBACKEND=Agg) and read the PNG. - List concrete visual issues at the target page width.
- Propose a unified
plt.rcParams.update({...})block plus per-call fixes (errorbarcapsize/capthick, stale kwargs removed). - Apply the edits, re-render, and verify each listed issue is resolved.
Data, colors, colormaps, linestyles, axis limits, and the user's composition are never touched.
| Input | Example |
|---|---|
script_path |
/path/to/plot.py |
venue |
NeurIPS 2026, Nature Communications, ICML 2026 |
fraction |
0.5 (half column), 1.0 (one column), 2.0 (double columns) |
You do not need to supply column widths or body font sizes — the skill looks them up from the venue.
- Python with
matplotlibinstalled on the machine running Claude Code. - The user's script must be runnable end-to-end (data loadable from the script's working directory).
![]() |
![]() |
| Before | After |

