
Matplotlib
This is the foundation of Python visualization. If you need publication-quality figures with precise control over every axis, label, and spine, this is what you reach for. The skill emphasizes the object-oriented interface (fig, ax = plt.subplots()) over the pyplot state machine, which is the right call for anything beyond throwaway plots. It's verbose compared to Seaborn but gives you full customization for scientific papers, multi-panel layouts, heatmaps, and LaTeX-formatted labels. The anti-patterns section is honest about common mistakes like mixing interfaces and using rainbow colormaps. For interactive dashboards or quick statistical plots, look elsewhere, but for static figures that need to be perfect, this is still the standard.
- skills.sh installs
- 375
- GitHub stars
- 25
- last updated
- Aug 21, 2026
Install
$ npx -y skills add tondevrel/scientific-agent-skills --skill matplotlib --agent claude-codeInstalls into .claude/skills of the current project.
Files
Matplotlib - Data Visualization
The most widely used library for 2D (and basic 3D) plotting. It provides full control over every element of a figure, from line styles to axis spines.
When to Use
- Creating publication-quality 2D plots (Line, Scatter, Bar, Hist)
- Visualizing scientific data (Heatmaps, Contours, Vector fields)
- Generating complex multi-panel figures
- Fine-tuning plots for papers/reports (LaTeX support)
- Building custom visualization tools and dashboards
- Plotting data directly from NumPy arrays or Pandas DataFrames
Reference Documentation
Official docs: https://matplotlib.org/stable/index.html
Gallery: https://matplotlib.org/stable/gallery/index.html (Essential for finding examples)
Search patterns: plt.subplots, ax.set_title, ax.legend, plt.savefig, matplotlib.colors
Core Principles
Two Interfaces: Choose Wisely
| Interface | Method | Use Case |
|---|---|---|
| Object-Oriented (OO) | fig, ax = plt.subplots() | Recommended. Best for complex, reproducible plots. |
| Pyplot (State-based) | plt.plot(x, y) | Quick interactive checks. Avoid for scripts/modules. |
Use Matplotlib For
Sponsors
Details
- Repository
- github.com/tondevrel/scientific-agent-skills
- Categories
- Code Review & Quality, AI & Agent Building, Data Science & ML, Python
- First seen
- Jun 3, 2026