matplotlib · tondevrel — Claude Code skill: Python plots done right
A skill that tells your agent how to build matplotlib figures: line and scatter plots, heatmaps, multi-panel layouts. Useful when the data sits in NumPy or Pandas and the output goes into a paper or report.
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a claude-codeWhat matplotlib does
The skill walks through the object-oriented interface: fig, ax = plt.subplots(), then axis labels, legends, ticks and saving. It ships patterns for lines, scatter, bars, histograms, heatmaps with a colorbar, contours, vector fields and 3D surfaces. Multi-panel figures get their own section, from a plain plt.subplots(2, 2) grid to gridspec.GridSpec with uneven cell ratios.
Publication styling is covered too: LaTeX labels via text.usetex, global settings through plt.rcParams.update, export to .pdf or .svg. The skill advises bbox_inches='tight' on save and dpi 300+ for print, and closing figures with plt.close('all') inside loops to avoid memory leaks. On colormaps it is blunt: jet fakes gradients, so use viridis, magma or inferno.
Interactive web dashboards and quick statistical exploration are out of scope — the skill points you to Plotly, Bokeh and Seaborn instead. Very large real-time datasets are out too. Install the skill with npx skills add; matplotlib itself comes from pip install matplotlib.
What it helps with
- plot a NumPy array without hand-tuning every axis
- assemble a multi-panel figure with uneven cell sizes
- export a figure to PDF without clipped labels
- label axes with LaTeX formulas for a paper
- draw a heatmap with a properly aligned colorbar
Example prompts for the agent
- plot sin(x) from 0 to 10 and save it as plot.pdf
- build a 2x2 grid with a heatmap, a histogram and an errorbar plot
- set rcParams so axis labels render in LaTeX, then plot the data
How to install matplotlib
1Skills CLI (Vercel)
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a claude-code2Manually: put the files in place
~/.claude/skills/matplotlib/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/matplotlib/
1Skills CLI (Vercel)
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a codex2Manually: put the files in place
.agents/skills/matplotlib/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a cursor2Manually: put the files in place
.cursor/skills/matplotlib/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install tondevrel/scientific-agent-skills matplotlib2Manually: put the files in place
.github/skills/matplotlib/SKILL.md1Skills CLI (Vercel)
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a gemini-cli2Platform CLI
gemini skills install https://github.com/tondevrel/scientific-agent-skills --path skills/matplotlibManually: put the files in place
.devin/skills/matplotlib/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about matplotlib
How do I install the matplotlib skill in Claude?
Run npx skills add tondevrel/scientific-agent-skills --skill matplotlib -a claude-code. The skill file lands at ~/.claude/skills/matplotlib/SKILL.md.
What does the matplotlib skill do?
It gives the agent rules and templates for matplotlib figures: lines, scatter, histograms, heatmaps, contours, 3D surfaces and multi-panel layouts. Publication styling with LaTeX gets its own section.
What is the matplotlib skill not for?
Interactive web dashboards and fast statistical exploration — it points to Plotly, Bokeh and Seaborn for those. Very large real-time datasets fall outside it as well.
Similar skills
Everything for Science and research →matplotlib by other authors comes first.