Software:Matplotlib

From HandWiki
Short description: Library for creating static, animated, and interactive visualizations in Python.
Matplotlib
Matplotlib logo.svg
Mpl screenshot figures and code.png
Screenshot of Matplotlib plots and code
Original author(s)John D. Hunter
Developer(s)Michael Droettboom, et al.
Initial release2003; 21 years ago (2003)[1]
Written inPython
EngineCairo, Anti-Grain Geometry
Operating systemCross-platform
TypePlotting
LicenseMatplotlib license
Websitematplotlib.org

Matplotlib 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.[2] SciPy makes use of Matplotlib.

Matplotlib was originally written by John D. Hunter. Since then it has had an active development community[3] 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[4] and was further joined by Thomas Caswell.[5][6] Matplotlib is a NumFOCUS fiscally sponsored project.[7]

Comparison with MATLAB

Pyplot is a Matplotlib module that provides a MATLAB-like interface.[8] Matplotlib is designed to be as usable as MATLAB, with the ability to use Python, and the advantage of being free and open-source.[citation needed]

Examples

Toolkits

Several toolkits are available which extend Matplotlib functionality. Some are separate downloads, others ship with the Matplotlib source code but have external dependencies.[9]

  • Basemap: map plotting with various map projections, coastlines, and political boundaries[10]
  • Cartopy: a mapping library featuring object-oriented map projection definitions, and arbitrary point, line, polygon and image transformation capabilities.[11] (Matplotlib v1.2 and above)
  • Excel tools: utilities for exchanging data with Microsoft Excel
  • GTK tools: interface to the GTK library
  • Qt interface
  • Mplot3d: 3-D plots
  • Natgrid: interface to the natgrid library for gridding irregularly spaced data.
  • tikzplotlib: export to Pgfplots for smooth integration into LaTeX documents (formerly known as matplotlib2tikz)[12]
  • Seaborn: provides an API on top of Matplotlib that offers sane choices for plot style and color defaults, defines simple high-level functions for common statistical plot types, and integrates with the functionality provided by Pandas

Related projects

  • Biggles[13]
  • Chaco[14]
  • DISLIN
  • GNU Octave
  • gnuplotlib – plotting for numpy with a gnuplot backend
  • Gnuplot-py[15]
  • PLplot – Python bindings available
  • SageMath – uses Matplotlib to draw plots
  • SciPy (modules plt and gplt)
  • Plotly – for interactive, online Matplotlib and Python graphs
  • Bokeh[16] – Python interactive visualization library that targets modern web browsers for presentation

References

  1. "Copyright Policy". https://matplotlib.org/users/license.html#copyright-policy. 
  2. "API Overview". matplotlib.org. https://matplotlib.org/stable/api/index.html#module-pylab. 
  3. "Matplotlib github stats". matplotlib.org. https://matplotlib.org/users/github_stats.html. 
  4. "Announcing Michael Droettboom as the lead Matplotlib developer". matplotlib.org. http://matplotlib.1069221.n5.nabble.com/ANN-Michael-Droettboom-matplotlib-lead-developer-td5037.html. 
  5. "Matplotlib Lead Developer Explains Why He Can't Fix the Docs—But You Can – NumFOCUS" (in en-US). NumFOCUS. 2017-10-05. https://www.numfocus.org/blog/matplotlib-lead-developer-explains-why-he-cant-fix-the-docs-but-you-can. 
  6. "Credits – Matplotlib 2.2.2 documentation". https://matplotlib.org/users/credits.html. 
  7. "NumFOCUS Sponsored Projects". NumFOCUS. https://numfocus.org/sponsored-projects. 
  8. "Matplotlib: Python plotting — Matplotlib 3.2.0 documentation". https://matplotlib.org/index.html. 
  9. "Toolkits". matplotlib.org. https://matplotlib.org/thirdpartypackages/index.html. 
  10. Whitaker, Jeffrey. "The Matplotlib Basemap Toolkit User's Guide (v. 1.0.5)". Matplotlib Basemap Toolkit documentation. https://matplotlib.org/basemap/index.html. Retrieved 24 April 2013. 
  11. Elson, Philip. "Cartopy". http://scitools.org.uk/cartopy/docs/latest/. Retrieved 24 April 2013. 
  12. Schlömer, Nico. "tikzplotlib". https://github.com/nschloe/tikzplotlib. Retrieved 7 November 2016. 
  13. "Bigglessimple, elegant python plotting". biggles.sourceforge.net. http://biggles.sourceforge.net/. Retrieved 24 November 2010. 
  14. "Chaco". code.enthought.com. http://docs.enthought.com/chaco/. 
  15. "Gnuplot.py on". gnuplot-py.sourceforge.net. http://gnuplot-py.sourceforge.net/. Retrieved 24 November 2010. 
  16. "Bokeh 2.0.0 Documentation". https://docs.bokeh.org/en/latest/. 

External links