matplotlib

Create publication-quality line, scatter, bar, histogram, heatmap, contour, and 3D plots with Matplotlib.

Updated Dec 8, 2025
One-click install
npx skills add https://github.com/Tianyi-Billy-Ma/PyTemplate --skill matplotlib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matplotlib
Source: https://github.com/Tianyi-Billy-Ma/PyTemplate/tree/main/.dev/ai/skills/skills/matplotlib
Command: npx skills add https://github.com/Tianyi-Billy-Ma/PyTemplate --skill matplotlib

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, numpy, scipy, argparse, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

It guides creating publication-quality visualizations using Matplotlib, covering both pyplot and OO interfaces, layout/ styling best practices, and exporting to common formats.

Core Features & Use Cases

  • 2D/3D plotting and multi-panel figures: Line, scatter, bar, heatmaps, contours, 3D plots, and subplots.
  • Publication-ready style: Prebuilt styles and best practices for figures intended for journals.
  • Export & reproducibility: Save figures as PNG/PDF/SVG with proper DPI and bounding.

Quick Start

Install Matplotlib, then run the included plot_template.py or style presets to create and export a publication figure.

Frequently Asked Questions about matplotlib

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create publication-quality plots with Matplotlib?

Publication-quality plots with Matplotlib use the pyplot or object-oriented Figure/Axes interface combined with rcParams styling, tight layouts, and high-DPI export. Apply best practices like choosing appropriate colormaps, adding clear annotations, and exporting to PNG, PDF, or SVG formats with proper bounding to meet journal standards.

Can I create multi-panel figures and 3D plots in Matplotlib?

Yes. Matplotlib supports multi-panel figures through subplots, and includes 3D plotting capabilities alongside 2D plots like line, scatter, bar, histograms, heatmaps, and contours. Combine these plot types in a single figure for complex scientific visualizations.

What file formats can I export Matplotlib figures to?

Matplotlib exports figures to PNG, PDF, SVG, and interactive formats. Each format supports high-DPI settings and tight bounding to ensure crisp, reproducible output suitable for publications, presentations, and web use.

How do I style Matplotlib plots for scientific papers?

Style Matplotlib plots using prebuilt style sheets, rcParams configuration, and color mapping options. Combine consistent fonts, appropriate color schemes, and proper axis labels with tight layouts and high-DPI export for figures that meet publication requirements.

Do I need to know both pyplot and object-oriented Matplotlib interfaces?

No, but both are supported. The pyplot interface offers simpler syntax for quick plots, while the Figure/Axes object-oriented interface provides finer control over complex multi-panel figures and styling—choose based on your workflow complexity.

Can I use Matplotlib with NumPy and SciPy for scientific visualization?

Yes. Matplotlib integrates with NumPy for array handling and SciPy for scientific computation, enabling streamlined workflows for data exploration, notebook-based analysis, and figure generation from computed results.