在图形用户界面中嵌入 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中显示数学文本

Display mathtext in WX

使用 Glade 3 的 Matplotlib

Matplotlib with Glade 3

mplcvd -- 一个图表钩子的示例

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