在图形用户界面中嵌入 Matplotlib#

您可以按照 embedding_in_SOMEGUI.py 示例,将 Matplotlib 直接嵌入到用户界面应用程序中.目前,Matplotlib 支持 PyQt/PySide,PyGObject,Tkinter 和 wxPython.

在 GUI 中嵌入 Matplotlib 时,您必须直接使用 Matplotlib API,而不是 pylab/pyplot 过程式接口,因此请查看 examples/api 目录,了解一些使用 API 的示例代码.

CanvasAgg 演示

CanvasAgg demo

在带有导航工具栏的 GTK3 中嵌入

Embed in GTK3 with a navigation toolbar

在 GTK3 中嵌入

Embed in GTK3

在带有导航工具栏的 GTK4 中嵌入

Embed in GTK4 with a navigation toolbar

嵌入 GTK4

Embed in GTK4

嵌入 Qt

Embed in Qt

嵌入 Tk

Embed in Tk

嵌入 wx #2

Embed in wx #2

嵌入 wx #3

Embed in wx #3

嵌入 wx #4

Embed in wx #4

嵌入 wx #5

Embed in wx #5

嵌入 WebAgg

Embedding WebAgg

傅里叶演示 WX

Fourier Demo WX

GTK3 电子表格

GTK3 spreadsheet

GTK4 电子表格

GTK4 spreadsheet

在 WX 中显示 mathtext

Display mathtext in WX

带有 Glade 3 的 Matplotlib

Matplotlib with Glade 3

mplcvd -- figure hook 的一个例子

mplcvd -- an example of figure hook

使用 GTK3 的 pyplot

pyplot with GTK3

使用 GTK4 的 pyplot

pyplot with GTK4

SVG 直方图

SVG Histogram

SVG 工具提示

SVG Tooltip

工具管理器

Tool Manager

嵌入到 Web 应用程序服务器 (Flask) 中

Embed in a web application server (Flask)

在 WX 中添加光标

Add a cursor in WX