matplotlib is a pure Python 2D plotting library designed to bring publication quality plotting to Python with a syntax familiar to MATLAB users. All of the plotting commands in the pylab interface can be accessed either via a functional interface familiar to MATLAB users or an object oriented interface familiar to Python users.
The library uses numpy for handling large data sets and supports a variety of output backends including GTK GTKAgg, GTKCairo, FltkAgg, QtAgg, TkAgg and WXAgg.
matplotlib is designed with the philosophy that you should be able to create simple plots with just a few commands, or even just one. It was originally conceived with MatLab’s users in mind. It’s the oldest plotting library but is still under active development.
Key Features
- Extremely powerful – matplotlib can create almost any visualization.
- Generate:
- Plots;
- Histograms;
- Power spectra;
- Bar charts;
- Error charts;
- Scatter plots and more.
- Designed to be usable as MATLAB.
- Object-oriented API for embedding plots into applications.
- Procedural “pylab” interface based on a state machine.
- Based on Python, a full-featured modern object-oriented programming language suitable for large-scale software development.
- Numerous rendering backends: GTK, GTKAgg, GTKCairo, GTK3Agg, GTK3Cairo, MacOSX, nbAgg, Qt4Agg, Qt4Cairo, Qt5Agg, Qt5Cairo, TkAgg, TkCairo, WebAgg, WX, WXAgg, WXCairo, agg, cairo, gdk, pdf, pgf, ps, svg, template
- Suitable for fast scripting, including CGI scripts.
- Free, open source, no license servers.
- Native SVG support.
- Well-tested tool with mature code.
- Rich ecosystem of Python tools are built around matplotlib.
- Support for Python 3 (support for Python 2 was dropped).
If you are looking to create web/interactive graphs, I’d recommend one of the other Python visualization packages.
Website: matplotlib.org
Support: Documentation, GitHub Code Repository
Developer: Michael Droettboom and many contributors (project started by the late John Hunter)
License: Based on the PSF license. Matplotlib only uses BSD compatible code.


matplotlib is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Image Processing Libraries | |
|---|---|
| matplotlib | Python 2D plotting library |
| OpenCV | Library that includes several hundreds of computer vision algorithms |
| VIPS | Fast image processing library with low memory requirements |
| SciPy | Scientific Computing Tools for Python |
| Pillow | Fork of the Python Imaging Library |
| Pillow-SIMD | Highly optimized downstream Pillow fork |
| scikit-image | Collection of algorithms for image processing |
| ImageMagick | Uses multiple computational threads to increase performance |
| GraphicsMagick | Billed as the Swiss army knife of image processing. |
| GEGL | Generic Graphics Library |
| Mahotas | Library of fast computer vision algorithms |
| SimpleITK | Image analysis toolkit with a large number of components |
| Netpbm | Toolkit for manipulation of graphic images |
| LibGD | Library for the dynamic creation of images by developers |
Read our verdict in the software roundup.
| Plotting Tools | |
|---|---|
| matplotlib | Python based plotting system in a style similar to Matlab |
| ggplot2 | Powerful R package for declaratively creating graphics |
| gnuplot | Command-line driven interactive plotting program |
| ROOT | Solves the data analysis challenges of high-energy physics |
| Octave | Built-in plotting and visualization tools |
| DataMelt | Produces professional graphics with libraries for data manipulation |
| Veusz | Scientific plotting and graphing program |
| LabPlot | Data plotting and function analysis tool for KDE |
| GLE | Graphics Layout Engine |
| PyVista | 3D plotting and mesh analysis |
| SciDAVis | Scientific Data Analysis and Visualization |
| PLplot | Scientific plotting library |
| Ctioga | Command-line plotting utility |
| AlphaPlot | Fork of SciDAVis |
| RLPlot | Generate publication quality graphs |
| ZeGrapher | 2D math and data plotter |
| Genius | Educational tool in mathematics and for research |
| Kst | Real-time large dataset viewing and plotting tool |
| Plots | Simple graph plotting app for GNOME |
| SSPlot | Simple plotting utility and numerical simulator |
Read our verdict in the software roundup.
| Python Visualization Packages | |
|---|---|
| matplotlib | Python 2D plotting library which produces publication quality figures |
| Diagrams | Draw the cloud system architecture in Python code |
| Bokeh | Elegant, concise construction of versatile graphics |
| Dash | Python framework for building analytical web applications |
| seaborn | Python visualization library based on matplotlib |
| Plotly | Interactive, browser-based graphing library for Python |
| VisPy | Visualize massive datasets in real time |
| Vega-Altair | Declarative Visualization in Python |
| plotnine | Grammar of graphics for Python |
| PyQtGraph | Python graphics and GUI library built on PyQt4 / PySide and numpy |
| bqplot | Interactive Plotting Framework for the Jupyter Notebook |
| Vaex | Fast visualization of big data |
| folium | Visualize data in a Leaflet map |
| HoloViews | Make Data Analysis and Visualization Seamless |
| Datashader | Generates aggregate arrays and representations of them as images |
| yt | Multi-code Toolkit for Analyzing and Visualizing Volumetric Data |
| Glumpy | Intuitive interface between NumPy and modern OpenGL |
| GeoViews | Explore and visualize geographical, meteorological, and oceanographic datasets |
| Pygal | Dynamic SVG charting library |
| Glue | Multi-dimensional linked-data exploration |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

