Guide · Agent skill
How to use the Matplotlib Plotting agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Matplotlib skill gives an AI agent a set of guidelines for creating, styling and exporting charts with Matplotlib, Python's standard plotting library. It is aimed at researchers, students and developers who want precise, publication-quality figures generated from their own Python data. After following this guide you will know how to install the skill, ask for plots in plain language, and review the safety points before running its bundled scripts.
Quick start
- 1Download the ZIP. Download the matplotlib skill as a ZIP file from this page.
- 2Unzip into the skills folder. Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project.
- 3Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the ZIP file.
- 4Install Python packages. Make sure Python 3.11+ is available, then run uv add "matplotlib==3.11.2" numpy scipy in your project.
- 5Ask for a plot. Describe the chart, your data and the output format in plain language.
- 6Review before running scripts. Read the bundled Python scripts so you know what the agent will execute on your computer.
What does the Matplotlib skill make the agent do?
Once installed, the agent follows this skill's guidance when building charts in Matplotlib. It knows how to build line, scatter, bar, histogram, heatmap, contour, box and 3D plots, arrange multi-panel figures, customise colours and fonts, and save image files in PNG, PDF or SVG.
The skill targets Matplotlib 3.11.2 and recommends the object-oriented interface (Figure and Axes) for most work. It also ships Python scripts and style presets the agent can run to generate example plots or custom style sheets.
- Plot types: line, scatter, bar, histogram, heatmap, contour, box, violin and 3D
- Multi-panel layouts using subplots, mosaic layouts or GridSpec
- Colour, font and style customisation, including rcParams
- Export to PNG, PDF and SVG for publication
How do you install the Matplotlib skill?
Download the skill as a ZIP file from this page and unzip it. You can install it for yourself or for a single project:
For all your projects, unzip it into ~/.claude/skills/. For one project only, unzip it into the .claude/skills/ folder inside that project.
In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
What do you need before you start?
The skill requires Python 3.11 or newer and Matplotlib 3.11.2. The bundled examples also use NumPy and SciPy. pandas is only needed for the pandas examples, and ipympl is only needed for Jupyter widgets. The source suggests uv for installation, and installing packages needs network access.
For project work, the source shows this setup command:
- Python 3.11+ and Matplotlib 3.11.2 (required)
- NumPy and SciPy (for bundled examples)
- pandas (optional, for pandas examples)
- ipympl (optional, for Jupyter widgets)
- uv (suggested for installation)
- No API keys or accounts are needed for local plotting
uv add "matplotlib==3.11.2" numpy scipyHow do you trigger the skill with a natural request?
You do not need special syntax. Describe the chart you want in plain language, and mention your data and output format. The agent uses the skill when the request involves creating or customising a plot, building a multi-panel figure, exporting visuals, or working with 3D or interactive plots.
Be specific about the file type and quality you need. For quick statistical charts or interactive dashboards, the skill itself points you to seaborn or plotly instead.
- "Plot these measurements as a scatter plot with a fitted line and save it as a 300 dpi PDF."
- "Make a 2x2 figure of my experiment results with shared axis labels and export it as SVG."
- "Convert this old Matplotlib script to the 3.11 API, especially the box plot arguments."
What examples and scripts are included?
The skill includes reference guides for the API, plot types, styling and common issues, plus two scripts: a plot template and a style configurator. The plot template provides executable synthetic examples. The style configurator is for generating custom style sheets.
The guide notes that fragment examples assume imports and named data, so adapt and validate them before use.
- references/api_reference.md: core classes and methods
- references/plot_types.md: examples for each plot type
- references/styling_guide.md: styling and colormap guidance
- references/common_issues.md: display and backend troubleshooting
- scripts/plot_template.py: runnable example plots
- scripts/style_configurator.py: custom style sheet generation
What safety points should you check?
This skill runs scripts and uses the network. The agent will execute Python files on your computer, and installing packages requires network access. Review the bundled scripts before letting the agent run them, especially on machines with sensitive data.
File output needs no GUI. For batch scripts, the source recommends setting the backend to Agg so no window is opened. Interactive windows need a GUI toolkit such as PySide6 or Tk, and these depend on your environment.
- Read scripts/plot_template.py and scripts/style_configurator.py before the first run
- Use MPLBACKEND=Agg for batch scripts that only save files
- GUI windows, Jupyter widgets and external LaTeX were not tested by the source's reviewers and depend on your environment
MPLBACKEND=AggWhat tips help you get better figures?
Ask for the object-oriented style and name your figure size and export settings. When migrating older code, tell the agent to follow the 3.11 conventions: use tick_labels and orientation for box plots, mpl.colormaps[name] for colormaps, and label contour lines rather than using contourf.
Save at 300 dpi with bbox_inches='tight' for print, and use vector formats such as PDF or SVG when the figure will be scaled.
- Use tick_labels and orientation for box plots in 3.11
- Use mpl.colormaps[name] to look up colormaps
- Use bbox_inches='tight' to avoid clipped labels
- For journal-styled multi-panel figures, use the scientific-visualization skill instead
What people use it for
- Creating a publication-quality scatter plot with a fitted line exported as PDF
- Building a 2x2 multi-panel figure of experiment results for a paper
- Converting older Matplotlib code to the 3.11 API
- Producing a heatmap or contour plot of a 2D scientific dataset
- Generating a custom style sheet for consistent figures across a project
Frequently asked questions
How do I install the Matplotlib agent skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
What does the matplotlib skill require?
It requires Python 3.11+ and Matplotlib 3.11.2. The bundled examples also use NumPy and SciPy, pandas is needed only for pandas examples, and ipympl only for Jupyter widgets. Network access is needed to install packages.
Is the Matplotlib skill free to use?
The skill is licensed under MIT, as listed on this page. The source does not mention pricing, and local plotting needs no accounts or API keys.
Does the skill run code on my computer?
Yes. The skill runs Python scripts and uses the network. Review the bundled scripts, such as scripts/plot_template.py, before letting the agent run them.
Should I use seaborn or plotly instead?
The skill recommends seaborn for quick statistical plots and plotly for interactive plots. Matplotlib gives you fine-grained control over plot elements and is best for publication figures built from your own data.
Why does my plot not show up or fail with a backend error?
Plotting to files needs no GUI, so set MPLBACKEND=Agg for batch scripts. Interactive windows need an installed GUI toolkit such as PySide6 (QtAgg) or Tk (TkAgg). The skill's common_issues reference covers these cases.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you need precise, publication-quality figures from Python data, or want an agent to write and debug Matplotlib code using current API conventions. Pick seaborn for quick statistical charts or plotly for interactive dashboards, since the skill itself points to them. Review the bundled scripts before running them, because the agent will execute Python on your machine.
Download the skill