matplotlib
Skill by davila7
Guides an AI assistant in using matplotlib, Python's plotting library, to create line, scatter, bar, histogram, heatmap and 3D plots. It is aimed at scientific visualization and publication figures.
Install matplotlib
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/matplotlib ~/.claude/skills/matplotlibRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/matplotlib ~/.gemini/antigravity-cli/skills/matplotlibAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives an AI assistant guidance on using matplotlib, Python's foundational visualization library for static, animated and interactive plots. It covers the pyplot interface and the object-oriented Figure and Axes API, and recommends the object-oriented style for most use cases. The skill includes examples for line, scatter, bar, histogram, heatmap, contour, box, violin and 3D plots.
It also explains multi-panel layouts with subplots, subplot_mosaic and GridSpec, styling with colormaps and rcParams, and exporting figures to PNG, PDF and SVG with dpi settings. Best practices cover colorblind-friendly colormaps, layout management and performance. The skill is aimed at users creating scientific visualizations and publication-quality figures in Python.
Written from the project's SKILL.md and checked against it.
What it can do
- Plot typesExamples for line, scatter, bar, histogram, heatmap, contour, box and violin plots.
- Object-oriented interfaceGuidance on creating figures and axes explicitly with fig, ax = plt.subplots().
- Subplot layoutsCovers regular grids, subplot_mosaic and GridSpec for multi-panel figures.
- Styling and colormapsExplains named colors, colormaps, style sheets, rcParams and text annotations.
- Figure exportShows saving to PNG, PDF and SVG with dpi, bbox_inches and transparency options.
- 3D plotsExamples for 3D surface, scatter and line plots using the 3d projection.
- Plot template scriptA scripts/plot_template.py file that demonstrates several plot types as a starting point.
- Style configurator scriptA scripts/style_configurator.py utility for setting style preferences and generating style sheets.
What you need
- Python
Try asking
- Make a line plot of sin and cos with a legend and save it as a 300 dpi PNG.
- Create a 2x2 subplot figure with scatter, bar and histogram panels.
- Build a heatmap of this correlation matrix with a colorbar and a colorblind-friendly colormap.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cli-tool/components/skills/scientific/matplotlib/SKILL.md, cli-tool/components/skills/scientific/matplotlib/scripts/plot_template.py, cli-tool/components/skills/scientific/matplotlib/scripts/style_configurator.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md11 KB -
references/api_reference.md11 KB -
references/common_issues.md13 KB -
references/plot_types.md12 KB -
references/styling_guide.md13 KB
Show all 7 files
-
scripts/plot_template.py12 KB -
scripts/style_configurator.py13 KB
Alternatives to matplotlib
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
matplotlib: common questions
What plot types does matplotlib cover in this skill?
The skill covers line, scatter, bar, histogram, heatmap, contour, box and violin plots, plus 3D surface, scatter and line plots.
Which file formats can figures be saved in?
The source shows saving figures to PNG, PDF and SVG, with dpi and bbox_inches options for resolution and whitespace.
Which interface does the skill recommend?
It recommends the object-oriented interface (fig, ax = plt.subplots()) for most use cases and production code, and reserves pyplot for quick exploration.
How do I install matplotlib?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is matplotlib free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is matplotlib safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to matplotlib?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
