Matplotlib
Encyclopedia
matplotlib is a plotting
Plotter
A plotter is a computer printing device for printing vector graphics. In the past, plotters were widely used in applications such as computer-aided design, though they have generally been replaced with wide-format conventional printers...

 library
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....

 for the Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 programming language and its NumPy numerical mathematics extension. It provides an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 API which allows plots to be embedded into applications using generic GUI toolkits, like wxPython
WxPython
-External links:* * at showmedo...

, Qt, or GTK. There is also a procedural
Procedural
Procedural may refer to:*Procedural programming, a computer programming concept*Procedural generation, a term used in connection with computer graphics applications to indicate that data is created algorithmically rather than directly specified by an artist...

 "pylab" interface based on a state machine (like OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

), designed to closely resemble that of MATLAB
MATLAB
MATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...

.

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

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

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

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

Toolkits

Several toolkits are available which extend matplotlib functionality. Some are separate downloads, others ship with the matplotlib source code but have external dependencies.
  • Basemap: map plotting with various map projections, coastlines, and political boundaries
  • Mplot3d: 3-D plots
  • Natgrid: interface to the natgrid library for gridding irregularly spaced data.
  • Excel tools: utilities for exchanging data with Microsoft Excel
    Microsoft Excel
    Microsoft Excel is a proprietary commercial spreadsheet application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications...

  • GTK tools: interface to the GTK+
    GTK+
    GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...

     library

Related projects

  • Biggles
  • Chaco
  • DISLIN
    DISLIN
    DISLIN is a high-level plotting library developed by Helmut Michels at the Max Planck Institute in Katlenburg-Lindau, Germany. Helmut Michels currently works as a mathematician and Unix system manager at the computer center of the institute....

  • GNU Octave
    GNU Octave
    GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command-line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB...

  • Gnuplot
    Gnuplot
    - License :Despite gnuplot's name, it is not part of or related to the GNU system and it is not distributed under the GNU General Public License .However, some GNU packages do use gnuplot....

    -py
  • PLplot
    PLplot
    PLplot is a library of functions that are often used to make scientific plots in compiled languages such as C, C++, D, Fortran, Ada, OCaml and Java. PLplot can also be used interactively by interpreted languages such as Octave, Python, Perl and Tcl. The current version was written primarily by...

     – provides also Python bindings
  • PyCha libcairo
    Cairo (graphics)
    cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends...

     implementation
  • PyPlotter – compatible with Jython
    Jython
    Jython, successor of JPython, is an implementation of the Python programming language written in Java.-Overview:Jython programs can seamlessly import and use any Java class. Except for some standard modules, Jython programs use Java classes instead of Python modules...

  • Pyx
  • ReportLab
    ReportLab
    ReportLab is the name of a London-based company that created and maintains the ReportLab Toolkit , a Python-based PDF generation toolkit, and related software, such as PyRXP...

  • SciPy
    SciPy
    SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...

     (modules plt and gplt)
  • wxPython
    WxPython
    -External links:* * at showmedo...

    (module wx.lib.plot.py)

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK