Matplotlib
Python library for creating static, animated and interactive plots and visualizations.
3. Used by agents' projects
Dependency in 167 public GitHub projects set up for AI coding agents that we scanned (2.7%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What Matplotlib does
Matplotlib started as a neurobiologist's tool for EEG data, and its latest bugfix notes go output path by output path: PDF, PGF, GIF via PillowWriter, Cairo, Qt and WebAgg.
Matplotlib popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Matplotlib is used
- Matplotlib is a dependency in 167 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (10.3% of the 1,623 Python ones), #2 of 95 in charts and data visualisation.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,399; those are left out of every share on this page.
- The most used alternative in our scan is Seaborn (60 projects).
- Projects that use it most often also use NumPy (65.3%), pandas (61.1%), Pillow (42.5%).
By coding agent
Often used with
Matplotlib in practice
Strengths
The README names four settings: Python scripts, Python/IPython shells, web application servers, and "various graphical user interface toolkits." It also says the figures are "publication-quality" in hardcopy formats.
The docs front page points to three top-level interfaces: <code>pyplot.figure</code> for a figure, and <code>pyplot.subplots</code> or <code>pyplot.subplot_mosaic</code> for subplots.
The 3.11.2 notes list fixes for <code>hexbin</code> clipping in PDF output, PGF hatch linewidth and color, and incorrect glyphs in Cairo backends. The same release speeds up RGBA-stage image resampling.
The docs front page gives a one-line install for each of pip, conda (conda-forge), pixi and uv. It also links to third-party distributions, nightly builds and source installs.
Watch out for
The docs warn that uv usually installs its own Python builds, and that "only recent versions of those Python builds (August 2025) work properly with the tkagg backend" for showing plots in a window. They suggest another supported GUI framework as an alternative, for example <code>pyside6</code>.
3.11.2 is the second bugfix release of 3.11.x. Its fixes include crashes, frame skew in GIFs saved with <code>PillowWriter</code>, and HiDPI handling in the Qt toolbar and WebAgg embeddings. The notes do not say which earlier versions were affected.
The GitHub repository metadata shows "License None". The docs site links to a License page under project information, but that page's text is not among the sources used here.
More about Matplotlib
Funding
- GitHub Sponsors: https://github.com/matplotlib
- GitHub Sponsors: https://github.com/numfocus
- Own page: https://numfocus.org/donate-to-matplotlib
- 16 GitHub sponsors
Agent Skills for it
- matplotlib: Creates and customizes scientific plots with Matplotlib. Used for fine-grained control over plot elements, novel plot types, and scientific
- matplotlib: Low-level plotting library for full customization. Use when you need fine-grained control over every plot element, creating novel plot types
Head to head
- Matplotlib vs Plotly used together in 23 projects
Packages around it
- numpy: N-dimensional arrays
- pandas: Dataframes
- pillow: Image processing
- requests: HTTP client
- python-dotenv: .env config loading
- scikit-learn: Machine learning
More in Charts and data visualisation
Alternatives
Matplotlib This page
Statistical data visualization library built on matplotlib with rich plot types.
Interactive data visualization library for Python with rich chart and dashboard support.
Create interactive plots and applications in the browser from Python code.
Grammar of Graphics implementation for Python inspired by ggplot2.
Get started
Install it.
pip install matplotlibRules for your agent
## Matplotlib
- Install with one of the commands the docs list: `pip install matplotlib`, `conda install -c conda-forge matplotlib`, `pixi add matplotlib` or `uv add matplotlib`.
- When using uv with the `tkagg` window backend, follow the docs' warning: use uv 0.8.7 or newer (`uv self update`) and keep bundled Pythons current (`uv python upgrade --reinstall`).
- If that is not possible, the docs suggest another supported GUI framework, e.g. `uv add matplotlib pyside6`.
- Create figures through the top-level interfaces the docs name: `pyplot.figure`, `pyplot.subplots` or `pyplot.subplot_mosaic`.
- If GIFs saved with `PillowWriter` show frame skew, or HiDPI looks wrong in the Qt toolbar or WebAgg embeddings, check the installed version. The 3.11.2 release notes list fixes for both.
- If the project leads to a publication, add the citation the README asks for.
- Send general questions to Discourse, which the README calls the recommended starting point.