.. _sphx_glr_gallery_user_interfaces:
.. _user_interfaces:
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.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_canvasagg_thumb.png
:alt: CanvasAgg demo
:ref:`sphx_glr_gallery_user_interfaces_canvasagg.py`
.. raw:: html
CanvasAgg demo
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_gtk3_panzoom_sgskip_thumb.png
:alt: Embedding in GTK3 with a navigation toolbar
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_gtk3_panzoom_sgskip.py`
.. raw:: html
Embedding in GTK3 with a navigation toolbar
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_gtk3_sgskip_thumb.png
:alt: Embedding in GTK3
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_gtk3_sgskip.py`
.. raw:: html
Embedding in GTK3
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_gtk4_panzoom_sgskip_thumb.png
:alt: Embedding in GTK4 with a navigation toolbar
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_gtk4_panzoom_sgskip.py`
.. raw:: html
Embedding in GTK4 with a navigation toolbar
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_gtk4_sgskip_thumb.png
:alt: Embedding in GTK4
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_gtk4_sgskip.py`
.. raw:: html
Embedding in GTK4
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_qt_sgskip_thumb.png
:alt: Embedding in Qt
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_qt_sgskip.py`
.. raw:: html
Embedding in Qt
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_tk_sgskip_thumb.png
:alt: Embedding in Tk
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_tk_sgskip.py`
.. raw:: html
Embedding in Tk
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_wx2_sgskip_thumb.png
:alt: Embedding in wx #2
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_wx2_sgskip.py`
.. raw:: html
Embedding in wx #2
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_wx3_sgskip_thumb.png
:alt: Embedding in wx #3
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_wx3_sgskip.py`
.. raw:: html
Embedding in wx #3
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_wx4_sgskip_thumb.png
:alt: Embedding in wx #4
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_wx4_sgskip.py`
.. raw:: html
Embedding in wx #4
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_in_wx5_sgskip_thumb.png
:alt: Embedding in wx #5
:ref:`sphx_glr_gallery_user_interfaces_embedding_in_wx5_sgskip.py`
.. raw:: html
Embedding in wx #5
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_embedding_webagg_sgskip_thumb.png
:alt: Embedding WebAgg
:ref:`sphx_glr_gallery_user_interfaces_embedding_webagg_sgskip.py`
.. raw:: html
Embedding WebAgg
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_fourier_demo_wx_sgskip_thumb.png
:alt: Fourier Demo WX
:ref:`sphx_glr_gallery_user_interfaces_fourier_demo_wx_sgskip.py`
.. raw:: html
Fourier Demo WX
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_gtk3_spreadsheet_sgskip_thumb.png
:alt: GTK3 Spreadsheet
:ref:`sphx_glr_gallery_user_interfaces_gtk3_spreadsheet_sgskip.py`
.. raw:: html
GTK3 Spreadsheet
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_gtk4_spreadsheet_sgskip_thumb.png
:alt: GTK4 Spreadsheet
:ref:`sphx_glr_gallery_user_interfaces_gtk4_spreadsheet_sgskip.py`
.. raw:: html
GTK4 Spreadsheet
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_mathtext_wx_sgskip_thumb.png
:alt: MathText WX
:ref:`sphx_glr_gallery_user_interfaces_mathtext_wx_sgskip.py`
.. raw:: html
MathText WX
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_mpl_with_glade3_sgskip_thumb.png
:alt: Matplotlib with Glade 3
:ref:`sphx_glr_gallery_user_interfaces_mpl_with_glade3_sgskip.py`
.. raw:: html
Matplotlib with Glade 3
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_pylab_with_gtk3_sgskip_thumb.png
:alt: pyplot with GTK3
:ref:`sphx_glr_gallery_user_interfaces_pylab_with_gtk3_sgskip.py`
.. raw:: html
pyplot with GTK3
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_pylab_with_gtk4_sgskip_thumb.png
:alt: pyplot with GTK4
:ref:`sphx_glr_gallery_user_interfaces_pylab_with_gtk4_sgskip.py`
.. raw:: html
pyplot with GTK4
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_svg_histogram_sgskip_thumb.png
:alt: SVG Histogram
:ref:`sphx_glr_gallery_user_interfaces_svg_histogram_sgskip.py`
.. raw:: html
SVG Histogram
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_svg_tooltip_sgskip_thumb.png
:alt: SVG Tooltip
:ref:`sphx_glr_gallery_user_interfaces_svg_tooltip_sgskip.py`
.. raw:: html
SVG Tooltip
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_toolmanager_sgskip_thumb.png
:alt: Tool Manager
:ref:`sphx_glr_gallery_user_interfaces_toolmanager_sgskip.py`
.. raw:: html
Tool Manager
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_web_application_server_sgskip_thumb.png
:alt: Embedding in a web application server (Flask)
:ref:`sphx_glr_gallery_user_interfaces_web_application_server_sgskip.py`
.. raw:: html
Embedding in a web application server (Flask)
.. raw:: html
.. only:: html
.. image:: /gallery/user_interfaces/images/thumb/sphx_glr_wxcursor_demo_sgskip_thumb.png
:alt: Adding a cursor in WX
:ref:`sphx_glr_gallery_user_interfaces_wxcursor_demo_sgskip.py`
.. raw:: html
Adding a cursor in WX
.. raw:: html
.. toctree::
:hidden:
/gallery/user_interfaces/canvasagg
/gallery/user_interfaces/embedding_in_gtk3_panzoom_sgskip
/gallery/user_interfaces/embedding_in_gtk3_sgskip
/gallery/user_interfaces/embedding_in_gtk4_panzoom_sgskip
/gallery/user_interfaces/embedding_in_gtk4_sgskip
/gallery/user_interfaces/embedding_in_qt_sgskip
/gallery/user_interfaces/embedding_in_tk_sgskip
/gallery/user_interfaces/embedding_in_wx2_sgskip
/gallery/user_interfaces/embedding_in_wx3_sgskip
/gallery/user_interfaces/embedding_in_wx4_sgskip
/gallery/user_interfaces/embedding_in_wx5_sgskip
/gallery/user_interfaces/embedding_webagg_sgskip
/gallery/user_interfaces/fourier_demo_wx_sgskip
/gallery/user_interfaces/gtk3_spreadsheet_sgskip
/gallery/user_interfaces/gtk4_spreadsheet_sgskip
/gallery/user_interfaces/mathtext_wx_sgskip
/gallery/user_interfaces/mpl_with_glade3_sgskip
/gallery/user_interfaces/pylab_with_gtk3_sgskip
/gallery/user_interfaces/pylab_with_gtk4_sgskip
/gallery/user_interfaces/svg_histogram_sgskip
/gallery/user_interfaces/svg_tooltip_sgskip
/gallery/user_interfaces/toolmanager_sgskip
/gallery/user_interfaces/web_application_server_sgskip
/gallery/user_interfaces/wxcursor_demo_sgskip