matplotlib

matplotlib
matplotlib
Matplotlib logo.svg
Original author(s) John Hunter
Stable release 1.1.0 / 6 October 2011; 46 days ago (2011-10-06)
Operating system Cross-platform
Type Plotting
License matplotlib licence
Website matplotlib.sourceforge.net

matplotlib is a plotting library for the Python programming language and its NumPy numerical mathematics extension. It provides an object-oriented API which allows plots to be embedded into applications using generic GUI toolkits, like 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.

matplotlib is written and maintained primarily by John Hunter, and is distributed under a BSD-style license.

Currently, matplotlib has support for Python versions 2.4 through 2.7.[1] It does not yet support Python 3.x, but there is an official py3k port under continuous development.[2]

The package pylab combines pyplot with NumPy into a single namespace.[3]

Contents

Comparison with MATLAB

The pylab interface makes matplotlib easy to learn for experienced MATLAB users, resulting in a viable alternative for many MATLAB users as a teaching tool for numerical mathematics and signal processing.

Some of the advantages of the combination of Python, NumPy, and matplotlib over MATLAB include:

  • Based on Python, a full-featured modern object-oriented programming language suitable for large-scale software development
  • Free, open source, no license servers
  • Native SVG support

Example plots

Toolkits

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

  • Basemap: map plotting with various map projections, coastlines, and political boundaries[5]
  • Mplot3d: 3-D plots
  • Natgrid: interface to the natgrid library for gridding irregularly spaced data.
  • Excel tools: utilities for exchanging data with Microsoft Excel
  • GTK tools: interface to the GTK+ library

Related projects

References

External links