matplotlib · k-dense-ai — Claude Code skill: scientific plots and export
A skill that guides the agent through Matplotlib: building scientific plots, tuning axes and legends, and exporting figures to PNG, PDF or SVG.
npx skills add K-Dense-AI/scientific-agent-skills --skill matplotlib -a claude-codeWhat matplotlib does
The skill tells the agent how to work with Matplotlib — which interface to pick, how to lay out several axes in one figure, how to label axes and legends. It ships examples for line charts, scatter plots, histograms, heatmaps, contours and box plots, plus scripts the agent can run through Bash.
You need Python 3.11+ and Matplotlib 3.11.2. The examples also pull in NumPy and SciPy, some use pandas, and Jupyter widgets need ipympl. Installing packages requires network access; drawing locally needs no credentials.
File output runs without a GUI. For batch scripts set MPLBACKEND=Agg, or select Agg before importing pyplot. Interactive windows need an installed GUI toolkit such as PySide6 (QtAgg) or a working Tk (TkAgg), and plt.ioff() will not drop the GUI thread requirement. Migrating older code? Check the 3.11 API changes: box plots now take tick_labels and orientation, and colormaps come from mpl.colormaps[name].
What it helps with
- plot a line chart or scatter plot from an array
- assemble a multi-panel figure from several axes
- tune colors, labels and legends for a journal
- save a figure as PNG, PDF or SVG for publication
- draw a heatmap or contour plot from a matrix
Example prompts for the agent
- Plot sin(x) and cos(x) on one figure and save it to
plot.pngwith dpi=300 - Build a 2 by 2 grid of four different charts and label the axes
- Draw a heatmap from this matrix and add a colorbar
How to install matplotlib
1Skills CLI (Vercel)
npx skills add K-Dense-AI/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 K-Dense-AI/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 K-Dense-AI/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 K-Dense-AI/scientific-agent-skills matplotlib2Manually: put the files in place
.github/skills/matplotlib/SKILL.md1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill matplotlib -a gemini-cli2Platform CLI
gemini skills install https://github.com/K-Dense-AI/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 K-Dense-AI/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 Code?
Run npx skills add K-Dense-AI/scientific-agent-skills --skill matplotlib -a claude-code. The skill lands at ~/.claude/skills/matplotlib/SKILL.md.
What does the matplotlib skill do?
It helps the agent create and customize scientific plots: choose between the pyplot and object-oriented interfaces, build multi-panel figures, and export them to PNG, PDF or SVG.
What does the skill require?
Python 3.11+ and Matplotlib 3.11.2. The examples also use NumPy and SciPy, some need pandas, and Jupyter widgets require ipympl.
Similar skills
Everything for Science and research →matplotlib by other authors comes first.