Matplotlib

Library for creating visualizations in Python
title: "Matplotlib" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["articles-with-example-python-(programming-language)-code", "free-plotting-software", "free-software-programmed-in-python", "python-(programming-language)-scientific-libraries", "science-software-that-uses-gtk", "science-software-that-uses-qt", "free-data-and-information-visualization-software"] description: "Library for creating visualizations in Python" topic_path: "general/articles-with-example-python-programming-language-code" source: "https://en.wikipedia.org/wiki/Matplotlib" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Library for creating visualizations in Python ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | Matplotlib |
| logo | Matplotlib logo.svg |
| logo size | 300px |
| screenshot | File:Mpl screenshot figures and code.png |
| caption | Screenshot of Matplotlib plots and code |
| author | John D. Hunter |
| developer | Michael Droettboom, et al. |
| released | |
| latest release version | |
| latest release date | |
| engine | Cairo, Anti-Grain Geometry |
| programming language | Python |
| operating system | Cross-platform |
| genre | Plotting |
| license | Matplotlib license |
| website | |
| :: |
| name = Matplotlib | logo = Matplotlib logo.svg | logo size = 300px | screenshot = File:Mpl screenshot figures and code.png | caption = Screenshot of Matplotlib plots and code | collapsible = | author = John D. Hunter | developer = Michael Droettboom, et al. | released = | latest release version = | latest release date = | latest preview version = | latest preview date = | engine = Cairo, Anti-Grain Geometry | discontinued = | programming language = Python | operating system = Cross-platform | platform = | size = | language = | genre = Plotting | license = Matplotlib license | website = Matplotlib (portmanteau of MATLAB, plot, and library) is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK. There is also a procedural "pylab" interface based on a state machine (like OpenGL), designed to closely resemble that of MATLAB, though its use is discouraged. SciPy makes use of Matplotlib.
Matplotlib was originally written by John D. Hunter. Since then it has had an active development community and is distributed under a BSD-style license. Michael Droettboom was nominated as matplotlib's lead developer shortly before John Hunter's death in August 2012 and was further joined by Thomas Caswell. Matplotlib is a NumFOCUS fiscally sponsored project.
Usage
Matplotlib is used in scientific research as a tool for data visualization. For example, the Event Horizon Telescope collaboration used Matplotlib to produce visualizations during the effort to create the first image of a black hole. Matplotlib also underpins the plotting functionality of many scientific Python libraries (for instance, pandas uses Matplotlib as its default backend for plotting). Its importance to the scientific community has been acknowledged by institutions such as NASA, which in 2024 awarded a grant to support Matplotlib’s continued development as part of an initiative to fund widely used open-source scientific software.
::figure[src="https://upload.wikimedia.org/wikipedia/commons/c/cd/Matplotlib_in_jupyter_notebook.png" caption="A scatter plot created in Jupyter Notebook using Matplotlib"] ::
In education and data science, Matplotlib is frequently used to teach programming and data visualization. It integrates with Jupyter Notebook, allowing students and instructors to generate inline plots and interactively explore data within a notebook environment. Many educational institutions incorporate Matplotlib into their curricula for teaching STEM concepts, and it is widely featured in tutorials, workshops, and open online courses as a primary plotting library.
Related projects
- DISLIN
- GNU Octave
- Plotly – for interactive, online Matplotlib and Python graphs
- PLplot – Python bindings available
- SageMath – uses
Matplotlibto draw plots
References
References
- "Copyright Policy".
- "History — Matplotlib 3.9.2 documentation".
- "API Overview". matplotlib.org.
- "Matplotlib github stats". matplotlib.org.
- "Announcing Michael Droettboom as the lead Matplotlib developer". matplotlib.org.
- (2017-10-05). "Matplotlib Lead Developer Explains Why He Can't Fix the Docs—But You Can – NumFOCUS". NumFOCUS.
- "Credits – Matplotlib 2.2.2 documentation".
- "NumFOCUS Sponsored Projects". NumFOCUS.
- "Case Study: First Image of a Black Hole".
- "NASA Funds Open-Source Software Underpinning Scientific Innovation".
- (18 September 2018). "Interactive notebooks: Sharing the code". Nature.
- "Pyplot tutorial".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::