Embedding Matplotlib in graphical user interfaces#

You can embed Matplotlib directly into a user interface application by following the embedding_in_SOMEGUI.py examples here. Currently Matplotlib supports PyQt/PySide, PyGObject, Tkinter, and wxPython.

When embedding Matplotlib in a GUI, you must use the Matplotlib API directly rather than the pylab/pyplot procedural interface, so take a look at the examples/api directory for some example code working with the API.

CanvasAgg demo

CanvasAgg demo

CanvasAgg demo
Embedding in GTK3 with a navigation toolbar

Embedding in GTK3 with a navigation toolbar

Embedding in GTK3 with a navigation toolbar
Embedding in GTK3

Embedding in GTK3

Embedding in GTK3
Embedding in GTK4 with a navigation toolbar

Embedding in GTK4 with a navigation toolbar

Embedding in GTK4 with a navigation toolbar
Embedding in GTK4

Embedding in GTK4

Embedding in GTK4
Embedding in Qt

Embedding in Qt

Embedding in Qt
Embedding in Tk

Embedding in Tk

Embedding in Tk
Embedding in wx #2

Embedding in wx #2

Embedding in wx #2
Embedding in wx #3

Embedding in wx #3

Embedding in wx #3
Embedding in wx #4

Embedding in wx #4

Embedding in wx #4
Embedding in wx #5

Embedding in wx #5

Embedding in wx #5
Embedding WebAgg

Embedding WebAgg

Embedding WebAgg
Fourier Demo WX

Fourier Demo WX

Fourier Demo WX
GTK3 spreadsheet

GTK3 spreadsheet

GTK3 spreadsheet
GTK4 spreadsheet

GTK4 spreadsheet

GTK4 spreadsheet
Display mathtext in WX

Display mathtext in WX

Display mathtext in WX
Matplotlib with Glade 3

Matplotlib with Glade 3

Matplotlib with Glade 3
mplcvd -- an example of figure hook

mplcvd -- an example of figure hook

mplcvd -- an example of figure hook
pyplot with GTK3

pyplot with GTK3

pyplot with GTK3
pyplot with GTK4

pyplot with GTK4

pyplot with GTK4
SVG Histogram

SVG Histogram

SVG Histogram
SVG Tooltip

SVG Tooltip

SVG Tooltip
Tool Manager

Tool Manager

Tool Manager
Embedding in a web application server (Flask)

Embedding in a web application server (Flask)

Embedding in a web application server (Flask)
Adding a cursor in WX

Adding a cursor in WX

Adding a cursor in WX