Matplotlib: Difference between revisions

Content deleted Content added
m fixed lint errors – invalid file options; see Help:Gallery tag#Inserting images
Added the section "Usage in Scientific Research and Education"
Tags: Reverted Visual edit
Line 27:
'''<big>M</big>atplotlib''' (portmanteau of [[MATLAB]], plot, and library<ref>{{cite web | url=https://matplotlib.org/stable/project/history.html | title=History — Matplotlib 3.9.2 documentation }}</ref>) is a [[Plotter|plotting]] [[Library (computer science)|library]] for the [[Python (programming language)|Python]] [[programming language]] and its [[Numerical analysis|numerical mathematics]] extension [[NumPy]]. It provides an [[Object-oriented programming|object-oriented]] [[API]] for embedding plots into applications using general-purpose [[GUI toolkit]]s like [[Tkinter]], [[wxPython]], [[Qt (software)|Qt]], or [[GTK]]. There is also a [[Procedural programming|procedural]] "pylab" interface based on a [[state machine]] (like [[OpenGL]]), designed to closely resemble that of [[MATLAB]], though its use is discouraged.<ref>{{cite web|title=API Overview|url=https://matplotlib.org/stable/api/index.html#module-pylab|publisher=matplotlib.org}}</ref> [[SciPy]] makes use of Matplotlib.
 
Matplotlib was originally written by [[John D. Hunter]]. Since then it has had an active development community<ref>{{cite web |url=https://matplotlib.org/users/github_stats.html |title=Matplotlib github stats |publisher=matplotlib.org }}</ref> and is distributed under a [[BSD licenses|BSD-style license]]. Michael Droettboom was nominated as matplotlib's lead developer shortly before John Hunter's death in August 2012<ref>{{cite web |url=http://matplotlib.1069221.n5.nabble.com/ANN-Michael-Droettboom-matplotlib-lead-developer-td5037.html |title=Announcing Michael Droettboom as the lead Matplotlib developer |publisher=matplotlib.org |access-date=2013-04-24 |archive-date=2020-10-27 |archive-url=https://web.archive.org/web/20201027122844/http://matplotlib.1069221.n5.nabble.com/ANN-Michael-Droettboom-matplotlib-lead-developer-td5037.html |url-status=dead }}</ref> and was further joined by Thomas Caswell.<ref>{{Cite news|url=https://www.numfocus.org/blog/matplotlib-lead-developer-explains-why-he-cant-fix-the-docs-but-you-can|title=Matplotlib Lead Developer Explains Why He Can't Fix the Docs—But You Can – NumFOCUS|date=2017-10-05|work=NumFOCUS|access-date=2018-04-11|language=en-US}}</ref><ref>{{Cite web|url=https://matplotlib.org/users/credits.html|title=Credits – Matplotlib 2.2.2 documentation|website=matplotlib.org|access-date=2018-04-11}}</ref> Matplotlib is a [[NumFOCUS]] fiscally sponsored project.<ref>{{cite web|title=NumFOCUS Sponsored Projects|url=https://numfocus.org/sponsored-projects|publisher=NumFOCUS|access-date=2021-10-25}}</ref>
 
== Usage in Scientific Research and Education ==
 
Matplotlib is widely utilized in scientific research as a tool for data visualization. Researchers across many disciplines such as physics, astronomy, engineering, and biology use Matplotlib to create publication-quality graphs and plots for their analyses and papers. An analysis of the [[arXiv]] preprint repository found that roughly 15% of all papers included figures generated with Matplotlib.<ref name="CoiledMatplotlib">{{cite web |title=How Popular is Matplotlib? |url=https://docs.coiled.io/user_guide/arxiv-matplotlib.html |website=Coiled Documentation |access-date=22 April 2025}}</ref> The library has been employed in well-known scientific projects; for example, the [[Event Horizon Telescope]] collaboration used Matplotlib to produce the first-ever image of a black hole.<ref name="NumPyBlackHole">{{cite web |title=Case Study: First Image of a Black Hole |url=https://numpy.org/case-studies/blackhole-image/ |website=NumPy |access-date=22 April 2025}}</ref> Matplotlib also underpins the plotting functionality of many scientific [[Python (Programming Language)|Python]] libraries (for instance, [[pandas (software)|pandas’]] data frame plotting uses Matplotlib as its backend).<ref name="SoftwareCarpentry">{{cite web |title=Plotting and Programming in Python |url=https://swcarpentry.github.io/python-novice-gapminder/09-plotting/index.html |website=Software Carpentry |access-date=22 April 2025}}</ref> Its importance to the scientific community has been acknowledged by institutions like [[NASA]], which in 2024 awarded a grant to support Matplotlib’s continued development as part of an initiative to support widely used open-source scientific software.<ref name="NASAOpenSource">{{cite web |title=NASA Funds Open-Source Software Underpinning Scientific Innovation |url=https://www.nasa.gov/news-release/nasa-funds-open-source-software-underpinning-scientific-innovation/ |website=NASA |access-date=22 April 2025}}</ref>
[[File:Matplotlib in jupyter notebook.png|thumb|284x284px|Example of Matplotlib being used in Jupyter Notebook]]
In education and data science, Matplotlib is a standard tool for teaching programming and visualization. It integrates seamlessly with [[Jupyter Notebook]], allowing students and instructors to generate inline plots and interactively explore data within a notebook environment.<ref name="GeeksforGeeksJupyter">{{cite web |title=Using Matplotlib with Jupyter Notebook |url=https://www.geeksforgeeks.org/using-matplotlib-with-jupyter-notebook/ |website=GeeksforGeeks |access-date=22 April 2025}}</ref> Matplotlib’s syntax is believed to be straightforward with extensive documentation available online, making it suitable for introducing concepts of data analysis and scientific computing in classrooms. Educational institutions commonly use Matplotlib in their curriculum to teach data visualization and STEM concepts,<ref name="MatplotlibTutorial">{{cite web |title=Pyplot tutorial |url=https://matplotlib.org/stable/tutorials/introductory/pyplot.html |website=Matplotlib |access-date=22 April 2025}}</ref> and it is featured in many tutorials, workshops, and open online courses as a primary plotting library. This widespread adoption in both academia and industry has solidified Matplotlib’s role as a commonly used in scientific and educational visualization workflows.
 
==Comparison with MATLAB==