Skills matplotlib
📊

matplotlib

Safe ⚙️ External commands🌐 Network access📁 Filesystem access

Create publication-ready plots with matplotlib

Also available from: davila7

Matplotlib provides complete control over every visual element for creating publication-quality figures. Master both pyplot and object-oriented interfaces to build any chart type from simple line plots to complex multi-panel scientific visualizations.

Supports: Claude Codex Code(CC)
🥈 77 Silver
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "matplotlib". Create a scatter plot showing the relationship between height and weight with proper labels

Expected outcome:

  • Generated scatter plot with height (cm) on x-axis and weight (kg) on y-axis
  • Added linear trend line showing correlation coefficient
  • Included axis labels: Height (cm) and Weight (kg)
  • Set title: Height vs Weight Relationship
  • Applied colorblind-friendly color scheme
  • Saved as high-resolution PNG (300 DPI) for publication

Using "matplotlib". Create a 2x2 multi-panel figure showing sales trends, product distribution, regional comparison, and monthly growth

Expected outcome:

  • Created figure with 4 subplots in 2x2 layout
  • Top-left: Line plot showing sales trends over 12 months
  • Top-right: Pie chart of product category distribution
  • Bottom-left: Bar chart comparing regional performance
  • Bottom-right: Area chart showing monthly growth rates
  • Applied consistent styling across all panels with unified legend

Security Audit

Safe
v4 • 1/17/2026

All 552 static findings are FALSE POSITIVES. The 'Ruby/shell backtick execution' (494 locations) are Python code examples in markdown documentation. 'Weak cryptographic algorithm' flags are metadata hashes and configuration access. 'C2 keywords' is 'claude' model identifier in metadata. 'System reconnaissance' is matplotlib querying available styles. 'Certificate/key files' is style configuration file writing. No malicious code execution, credential exfiltration, or network abuse detected.

8
Files scanned
3,468
Lines analyzed
3
findings
4
Total audits
Audited by: claude View Audit History →

Quality Score

68
Architecture
90
Maintainability
87
Content
30
Community
100
Security
91
Spec Compliance

What You Can Build

Create publication-ready figures

Generate high-quality plots for research papers with proper labeling, error bars, and multiple subplot layouts

Explore and visualize datasets

Quickly plot data distributions, correlations, and trends to understand patterns before formal analysis

Learn data visualization fundamentals

Master plotting concepts through hands-on examples covering all major chart types and customization techniques

Try These Prompts

Basic Line Plot
Create a line plot of my data with dates on x-axis and values on y-axis. Add proper labels and grid.
Multi-panel Figure
Create a 2x2 subplot layout showing histogram, scatter plot, box plot, and bar chart of my dataset
Publication Styling
Apply publication-quality styling to my plot: increase font sizes, remove top/right spines, use appropriate DPI
Custom Annotations
Add arrows and text annotations to mark the maximum value and important events on my time series plot

Best Practices

  • Always use the object-oriented interface (fig, ax = plt.subplots()) for better control and maintainability
  • Set figure size and DPI appropriately for your output medium (300 DPI for print, 150 DPI for web)
  • Use constrained_layout=True or tight_layout() to prevent overlapping elements

Avoid

  • Avoid using the pyplot state machine interface for complex figures - it leads to confusing code
  • Do not use rainbow/jet colormaps - they are not perceptually uniform and can misrepresent data
  • Never save figures without bbox_inches='tight' - it leaves unnecessary whitespace

Frequently Asked Questions

What is the difference between pyplot and object-oriented interfaces?
Pyplot is MATLAB-style with implicit state, while OO interface gives explicit control. Use OO for production code.
How do I save high-quality figures for publications?
Use plt.savefig('figure.png', dpi=300, bbox_inches='tight') for print quality. Use PDF/SVG for vector graphics.
Why are my subplot labels overlapping?
Add constrained_layout=True when creating subplots or call fig.tight_layout() before saving.
Which colormap should I use?
Use viridis/plasma for sequential data, coolwarm for diverging data, and tab10 for categorical data.
How do I create a colorblind-friendly plot?
Use colormaps like viridis or cividis, and add patterns or hatching to bars in addition to colors.
Can I use matplotlib in Jupyter notebooks?
Yes, use %matplotlib inline for static plots or %matplotlib widget for interactive plots in Jupyter.

Developer Details

Author

K-Dense-AI

License

https://github.com/matplotlib/matplotlib/tree/main/LICENSE

Ref

main