示例#

有关我们提供的绘图方法的概述,请参阅 绘图类型

此页面包含示例图.单击任何图像以查看完整图像和源代码.

有关更长的教程,请参阅我们的 tutorials page .您还可以在我们的 external resources 中找到 FAQuser guide .

标记!

您还可以按 tags 浏览示例库.

线条,条形和标记#

带有独立柱状颜色的柱状图

Bar chart with individual bar colors

带有标签的柱状图

Bar chart with labels

堆叠柱状图

Stacked bar chart

带有标签的分组柱状图

Grouped bar chart with labels

水平柱状图

Horizontal bar chart

断裂条形图

Broken Barh

绘制分类变量

Plotting categorical variables

绘制两个信号的相干性

Plotting the coherence of two signals

互谱密度(CSD)

Cross spectral density (CSD)

带有误差带的曲线

Curve with error band

误差线限制选择

Errorbar limit selection

误差线子采样

Errorbar subsampling

EventCollection 演示

EventCollection Demo

Eventplot 演示

Eventplot demo

填充多边形

Filled polygon

fill_between 带透明度

fill_between with transparency

填充两条线之间的区域

Fill the area between two lines

填充两条垂直线之间的区域

Fill the area between two vertical lines

带有渐变的条形图

Bar chart with gradients

帽子图

Hat graph

离散分布作为水平条形图

Discrete distribution as horizontal bar chart

JoinStyle

JoinStyle

虚线样式配置

Dashed line style configuration

带有刻度路径效果的线条

Lines with a ticked patheffect

线条样式

Linestyles

Marker 参考

Marker reference

Markevery 演示

Markevery Demo

绘制屏蔽值和 NaN 值

Plotting masked and NaN values

多色线条

Multicolored lines

将标记属性映射到多元数据

Mapping marker properties to multivariate data

功率谱密度 (PSD)

Power spectral density (PSD)

散点演示2

Scatter Demo2

带有直方图的散点图

Scatter plot with histograms

带有掩码值的散点图

Scatter plot with masked values

标记示例

Marker examples

带有图例的散点图

Scatter plot with a legend

折线图

Line plot

使用 fill_between 填充由逻辑掩码定义的区域

Shade regions defined by a logical mask using fill_between

频谱表示

Spectrum representations

堆叠图和流图

Stackplots and streamgraphs

阶梯演示

Stairs Demo

茎图

Stem plot

阶梯演示

Step Demo

带有线条,日期和文本的时间线

Timeline with lines, dates, and text

hlines 和 vlines

hlines and vlines

互相关和自相关

Cross- and auto-correlation

图像,轮廓和场#

图像的仿射变换

Affine transform of an image

风羽

Wind barbs

条形码

Barcode

交互式调整颜色映射范围

Interactive adjustment of colormap range

颜色映射归一化

Colormap normalizations

颜色映射归一化 SymLogNorm

Colormap normalizations SymLogNorm

轮廓角掩模

Contour corner mask

轮廓演示

Contour Demo

轮廓图像

Contour image

等高线标签示例

Contour Label Demo

Contourf 示例

Contourf demo

Contourf 填充图案

Contourf hatching

Contourf 和对数颜色刻度

Contourf and log color scale

优化解决方案空间的等高线图

Contouring the solution space of optimizations

BboxImage 演示

BboxImage Demo

Figimage 演示

Figimage Demo

带注释的热图

Annotated heatmap

图像重采样

Image resampling

用补丁裁剪图像

Clipping images with patches

绘制图像的多种方法

Many ways to plot images

带有掩码值的图像

Image with masked values

图像非均匀

Image nonuniform

在 2D 图像中混合透明度与颜色

Blend transparency with color in 2D images

修改坐标格式化器

Modifying the coordinate formatter

imshow 的插值方法

Interpolations for imshow

不规则间隔数据的等高线图

Contour plot of irregularly spaced data

使用 alpha 混合分层图像

Layer images with alpha blending

使用 matshow 可视化矩阵

Visualize matrices with matshow

具有一个颜色条的多个图像

Multiple images with one colorbar

pcolor图像

pcolor images

pcolormesh网格和阴影

pcolormesh grids and shading

pcolormesh

pcolormesh

Streamplot

Streamplot

QuadMesh 演示

QuadMesh Demo

高级 quiver 和 quiverkey 函数

Advanced quiver and quiverkey functions

Quiver 简单演示

Quiver Simple Demo

阴影示例

Shading example

声谱图

Spectrogram

Spy 演示

Spy Demos

Tricontour 演示

Tricontour Demo

Tricontour 平滑 Delaunay

Tricontour Smooth Delaunay

Tricontour 平滑用户

Tricontour Smooth User

Trigradient 演示

Trigradient Demo

Triinterp 演示

Triinterp Demo

Tripcolor 演示

Tripcolor Demo

Triplot 演示

Triplot Demo

水印图像

Watermark image

子图,坐标轴和图形#

对齐标签和标题

Align labels and titles

以编程方式控制子图调整

Programmatically control subplot adjustment

Axes 框体纵横比

Axes box aspect

Axes 演示

Axes Demo

使用 margins 和 sticky_edges 控制视图限制

Controlling view limits using margins and sticky_edges

Axes 属性

Axes properties

轴缩放效果

Axes zoom effect

绘制跨越轴的区域

Draw regions that span an Axes

相等轴纵横比

Equal axis aspect ratio

轴标签位置

Axis label position

断裂轴

Broken axis

自定义 Figure 子类

Custom Figure subclasses

使用约束布局调整轴的大小

Resize Axes with constrained layout

使用紧凑布局调整坐标轴大小

Resize Axes with tight layout

同一坐标轴上的不同刻度

Different scales on the same Axes

不同单位的图形大小

Figure size in different units

图形标签:suptitle,supxlabel,supylabel

Figure labels: suptitle, supxlabel, supylabel

相邻的子图

Adjacent subplots

地理投影

Geographic Projections

使用子图和 GridSpec 组合两个子图

Combine two subplots using subplots and GridSpec

用于多列/行子图布局的 Gridspec

Gridspec for multi-column/row subplot layouts

嵌套的 Gridspecs

Nested Gridspecs

反转轴

Inverted axis

管理 pyplot 中的多个图形

Manage multiple figures in pyplot

次坐标轴

Secondary Axis

共享轴的限制和视图

Share axis limits and views

共享轴

Shared axis

图形子图

Figure subfigures

多个子图

Multiple subplots

子图间距和边距

Subplots spacings and margins

使用 plt.subplots 创建多个子图

Create multiple subplots using plt.subplots

具有不同比例的绘图

Plots with different scales

缩放区域插入轴

Zoom region inset Axes

统计#

箱线图中的艺术家自定义

Artist customization in box plots

具有自定义填充颜色的箱线图

Box plots with custom fill colors

箱线图

Boxplots

箱线图与小提琴图的比较

Box plot vs. violin plot comparison

箱线图的单独计算和绘图

Separate calculation and plotting of boxplots

绘制二维数据集的置信椭圆

Plot a confidence ellipse of a two-dimensional dataset

小提琴图自定义

Violin plot customization

误差线函数

Errorbar function

指定误差棒的不同方式

Different ways of specifying error bars

在误差线中包含上限和下限

Including upper and lower limits in error bars

使用 PatchCollection 从误差线创建框

Create boxes from error bars using PatchCollection

六边形分箱图

Hexagonal binned plot

直方图

Histograms

双直方图

Bihistogram

累积分布

Cumulative distributions

直方图函数不同 histtype 设置的演示

Demo of the histogram function's different histtype settings

带有多个数据集的直方图(hist)函数

The histogram (hist) function with multiple data sets

直方图箱,密度和权重

Histogram bins, density, and weight

并排显示多个直方图

Multiple histograms side by side

时间序列直方图

Time Series Histogram

小提琴图基础

Violin plot basics

饼图和极坐标图#

饼图

Pie charts

饼图的条形图

Bar of pie

嵌套饼图

Nested pie charts

带有标签的饼图和甜甜圈图

A pie and a donut with labels

极坐标轴上的条形图

Bar chart on polar axis

极坐标图

Polar plot

极坐标轴上的误差条渲染

Error bar rendering on polar axis

极坐标图例

Polar legend

极坐标轴上的散点图

Scatter plot on polar axis

文本,标签和注释#

重音文本

Accented text

对齐 y 轴标签

Align y-labels

比例不变的角度标签

Scale invariant angle label

括号箭头的角度注释

Angle annotations on bracket arrows

注释变换

Annotate transform

注释绘图

Annotating a plot

注释绘图

Annotate plots

注释极坐标图

Annotate polar plots

箭头演示

Arrow Demo

自动换行文本

Auto-wrap text

组合自定义图例

Compose custom legends

日期刻度标签

Date tick labels

AnnotationBbox 演示

AnnotationBbox demo

将文本用作路径

Using a text as a Path

文本旋转模式

Text rotation mode

\dfrac 和 \frac 之间的区别

The difference between \dfrac and \frac

使用工程记数法格式化刻度

Format ticks using engineering notation

注释箭头样式参考

Annotation arrow style reference

样式化文本框

Styling text boxes

图例演示

Figure legend demo

配置字体族

Configure the font family

使用 ttf 字体文件

Using ttf font files

字体表

Font table

字体演示(面向对象风格)

Fonts demo (object-oriented style)

字体演示 (关键字参数)

Fonts demo (keyword arguments)

标记子图

Labelling subplots

使用预定义标签的图例

Legend using pre-defined labels

图例演示

Legend Demo

艺术家中的艺术家

Artist within an artist

将文本转换为图像

Convert texts to images

Mathtext

Mathtext

数学表达式

Mathematical expressions

数学字体族

Math fontfamily

多行

Multiline

放置文本框

Placing text boxes

连接具有不同属性的文本对象

Concatenate text objects with different properties

STIX 字体

STIX Fonts

使用 TeX 渲染数学公式

Render math equations using TeX

文本对齐

Text alignment

文本属性

Text properties

使用字典控制文本和标签的样式

Controlling style of text and labels using a dictionary

数据坐标系中的文本旋转角度

Text rotation angle in data coordinates

标题定位

Title positioning

Unicode 负号

Unicode minus

Usetex 文本基线

Usetex text baseline

Usetex 字体效果

Usetex font effects

文本水印

Text watermark

颜色#

要了解 Matplotlib 中可用的颜色映射的描述,请参阅 colormaps tutorial .

颜色演示

Color Demo

按 y 值着色

Color by y-value

默认属性循环中的颜色

Colors in the default property cycle

颜色条

Colorbar

Colormap 参考

Colormap reference

从颜色列表创建 colormap

Create a colormap from a list of colors

从颜色映射中选择单个颜色

Selecting individual colors from a colormap

命名颜色列表

List of named colors

设置颜色 alpha 值的方法

Ways to set a color's alpha value

形状和集合#

箭头指南

Arrow guide

Matplotlib artists 参考

Reference for Matplotlib artists

具有自动缩放的 Line,Poly 和 RegularPoly 集合

Line, Poly and RegularPoly Collection with autoscaling

复合路径

Compound path

海豚

Dolphins

甜甜圈!!!

Mmh Donuts!!!

带有方向箭头的椭圆演示

Ellipse with orientation arrow demo

椭圆集合

Ellipse Collection

椭圆演示

Ellipse Demo

绘制花式框

Drawing fancy boxes

阴影演示

Hatch demo

阴影样式参考

Hatch style reference

使用 LineCollection 绘制多条线

Plot multiple lines using a LineCollection

圆,楔和多边形

Circles, Wedges and Polygons

PathPatch 对象

PathPatch object

贝塞尔曲线

Bezier curve

散点图

Scatter plot

样式表#

Hackers 风格表中用于贝叶斯方法

Bayesian Methods for Hackers style sheet

深色背景样式表

Dark background style sheet

FiveThirtyEight 样式表

FiveThirtyEight style sheet

ggplot 样式表

ggplot style sheet

灰度样式表

Grayscale style sheet

Petroff10 样式表

Petroff10 style sheet

Solarized Light 样式表

Solarized Light stylesheet

样式表参考

Style sheets reference

模块 - pyplot#

无限线

Infinite lines

简单绘图

Simple plot

使用 pyplot 的文本和 mathtext

Text and mathtext using pyplot

使用 pyplot 绘制多条线

Multiple lines using pyplot

使用 pyplot 绘制两个子图

Two subplots using pyplot

模块 - axes_grid1#

锚定方向箭头

Anchored Direction Arrow

坐标轴分割器

Axes divider

演示坐标轴网格

Demo Axes Grid

Axes Grid2

Axes Grid2

HBoxDivider 和 VBoxDivider 演示

HBoxDivider and VBoxDivider demo

使用 RGBAxes 显示 RGB 通道

Show RGB channels using RGBAxes

带有 AxesDivider 的颜色条

Colorbar with AxesDivider

使用 Inset Axes 控制颜色条的位置和大小

Control the position and size of a colorbar with Inset Axes

每行或每列的颜色条

Per-row or per-column colorbars

具有固定物理尺寸的坐标轴

Axes with a fixed physical size

具有固定纵横比的 ImageGrid 单元格

ImageGrid cells with a fixed aspect ratio

Inset 定位器演示

Inset locator demo

Inset 定位器演示 2

Inset locator demo 2

使用 axes_grid 为 ylabel 腾出空间

Make room for ylabel using axes_grid

Parasite Simple

Parasite Simple

Parasite Simple2

Parasite Simple2

使用可定位的 Axes 将直方图与散点图对齐

Align histogram to scatter plot using locatable Axes

简单的锚定艺术家

Simple Anchored Artists

简单轴分割器 1

Simple Axes Divider 1

简单轴分割器 3

Simple axes divider 3

简单 ImageGrid

Simple ImageGrid

简单 ImageGrid 2

Simple ImageGrid 2

简单轴线4

Simple Axisline4

模块 - axisartist#

轴方向

Axis Direction

axis_direction 演示

axis_direction demo

轴线样式

Axis line styles

曲线网格演示

Curvilinear grid demo

演示 CurveLinear Grid2

Demo CurveLinear Grid2

floating_axes 特性

floating_axes features

floating_axis 演示

floating_axis demo

寄生轴演示

Parasite Axes demo

寄生轴演示

Parasite axis demo

刻度标签对齐

Ticklabel alignment

刻度标签方向

Ticklabel direction

简单的轴线方向

Simple axis direction

简单的轴线刻度标签和刻度方向

Simple axis tick label and tick directions

简单的轴线填充

Simple axis pad

使用 axisartist 的自定义 spines

Custom spines with axisartist

简单的 Axisline

Simple Axisline

简单的 Axisline3

Simple Axisline3

展示#

图形的解剖

Anatomy of a figure

Firefox

Firefox

积分作为曲线下的面积

Integral as the area under a curve

阴影和功率归一化渲染

Shaded & power normalized rendering

重叠轴的平移/缩放事件

Pan/zoom events of overlapping axes

32 年来的股票价格

Stock prices over 32 years

XKCD

XKCD

动画#

衰减

Decay

动画直方图

Animated histogram

pyplot 动画

pyplot animation

贝叶斯更新

The Bayes update

双摆问题

The double pendulum problem

使用预先计算的图像列表的动画图像

Animated image using a precomputed list of images

帧抓取

Frame grabbing

多轴动画

Multiple Axes animation

暂停和恢复动画

Pause and resume an animation

雨滴模拟

Rain simulation

动画 3D 随机游走

Animated 3D random walk

动画折线图

Animated line plot

保存为GIF动画散点图

Animated scatter saved as GIF

示波器

Oscilloscope

Matplotlib 解锁

Matplotlib unchained

事件处理#

Matplotlib 支持具有 GUI 中性事件模型的 event handling ,因此您可以连接到 Matplotlib 事件,而无需了解 Matplotlib 最终将插入到什么用户界面中.这有两个优点:您编写的代码将更具可移植性,并且 Matplotlib 事件知道诸如数据坐标空间以及事件发生在哪个轴之类的事情,因此您不必处理低级转换细节即可从画布空间转到数据空间.还包括对象拾取示例.

关闭事件

Close event

鼠标移动和点击事件

Mouse move and click events

十字光标

Cross-hair cursor

数据浏览器

Data browser

Figure/Axes 进入和离开事件

Figure/Axes enter and leave events

交互函数

Interactive functions

滚动事件

Scroll event

按键事件

Keypress event

Lasso 演示

Lasso Demo

图例拾取

Legend picking

窥镜

Looking glass

路径编辑器

Path editor

Pick 事件演示

Pick event demo

Pick 事件演示 2

Pick event demo 2

多边形编辑器

Polygon editor

Pong

Pong

重采样数据

Resampling Data

定时器

Timers

Trifinder 事件演示

Trifinder Event Demo

Viewlims

Viewlims

缩放修改其他坐标轴

Zoom modifies other Axes

其他#

锚定艺术家

Anchored Artists

识别艺术家对象是否相交

Identify whether artists intersect

手动绘制轮廓

Manual Contour

坐标报告

Coords Report

自定义投影

Custom projection

自定义 Rc

Customize Rc

AGG 过滤器

AGG filter

带状框

Ribbon box

直接向图像添加线条

Add lines directly to a figure

填充螺旋

Fill spiral

Findobj 示例

Findobj Demo

字体索引

Font indexing

字体属性

Font properties

使用矩形和 PolyCollections 构建直方图

Building histograms using Rectangles and PolyCollections

超链接

Hyperlinks

图像缩略图

Image thumbnail

使用关键字绘图

Plotting with keywords

Matplotlib 标志

Matplotlib logo

多页 PDF

Multipage PDF

多进程

Multiprocessing

堆积气泡图

Packed-bubble chart

路径效果演示

Patheffect Demo

将图像打印到标准输出

Print image to stdout

矢量图形的栅格化

Rasterization for vector graphics

设置和获取属性

Set and get properties

将SVG过滤器应用于线条

Apply SVG filter to a line

SVG过滤器饼图

SVG filter pie

表格演示

Table Demo

TickedStroke patheffect

TickedStroke patheffect

transforms.offset_copy

transforms.offset_copy

Zorder 演示

Zorder Demo

3D 绘图#

在 3D 图上绘制 2D 数据

Plot 2D data on 3D plot

3D 条形图演示

Demo of 3D bar charts

将数据裁剪到坐标轴视图限制

Clip the data to the axes view limits

在不同的平面上创建 2D 条形图

Create 2D bar graphs in different planes

3D 盒状表面图

3D box surface plot

绘制 3D 轮廓(水平)曲线

Plot contour (level) curves in 3D

使用 extend3d 选项绘制 3D 轮廓(水平)曲线

Plot contour (level) curves in 3D using the extend3d option

将轮廓剖面投影到图上

Project contour profiles onto a graph

填充轮廓

Filled contours

将填充轮廓投影到图表上

Project filled contour onto a graph

3D 曲面绘图中的自定义 hillshading

Custom hillshading in a 3D surface plot

3D 误差线

3D errorbars

填充 3D 线之间的区域

Fill between 3D lines

填充 3D 折线图下方区域

Fill under 3D line graphs

创建 2D 数据的 3D 直方图

Create 3D histogram of 2D data

3D 中的 2D 图像

2D images in 3D

相交平面

Intersecting planes

参数曲线

Parametric curve

洛伦兹吸引子

Lorenz attractor

同一图中具有 2D 和 3D 轴

2D and 3D Axes in same figure

自动文本偏移

Automatic text offsetting

在3D图中绘制平面对象

Draw flat objects in 3D plot

生成3D多边形

Generate 3D polygons

3D图投影类型

3D plot projection types

3D 箭袋图

3D quiver plot

旋转 3D 图

Rotating a 3D plot

3D 散点图

3D scatterplot

3D 茎图

3D stem

作为子图的 3D 图形

3D plots as subplots

3D 表面(颜色图)

3D surface (colormap)

3D 表面(纯色)

3D surface (solid color)

3D 表面(棋盘格)

3D surface (checkerboard)

具有极坐标的 3D 表面

3D surface with polar coordinates

3D 中的文本注释

Text annotations in 3D

三角 3D 等高线图

Triangular 3D contour plot

三角形 3D 填充轮廓图

Triangular 3D filled contour plot

三角形 3D 曲面

Triangular 3D surfaces

更多三角形 3D 曲面

More triangular 3D surfaces

主 3D 视图平面

Primary 3D view planes

3D 体素/体积图

3D voxel / volumetric plot

NumPy 标志的 3D 体素图

3D voxel plot of the NumPy logo

具有 RGB 颜色的 3D 体素/体积图

3D voxel / volumetric plot with RGB colors

具有柱坐标的 3D 体素/体积图

3D voxel / volumetric plot with cylindrical coordinates

3D 线框图

3D wireframe plot

动画 3D 线框图

Animate a 3D wireframe plot

一个方向上的 3D 线框图

3D wireframe plots in one direction

标度#

这些示例涵盖了 Matplotlib 中如何处理不同的标度.

Asinh 演示

Asinh Demo

Loglog 纵横比

Loglog aspect

自定义比例

Custom scale

对数柱状图

Log Bar

Logit 演示

Logit Demo

探索归一化

Exploring normalizations

标度

Scales

对数轴

Log Axis

Symlog 演示

Symlog Demo

特殊图表#

山体阴影

Hillshading

安斯库姆四重奏

Anscombe's quartet

Hinton 图

Hinton diagrams

石川图

Ishikawa Diagram

左心室牛眼图

Left ventricle bullseye

雷达图(又名蜘蛛图或星形图)

Radar chart (aka spider or star chart)

Sankey 类

The Sankey class

使用 Sankey 的长连接链

Long chain of connections using Sankey

朗肯循环

Rankine power cycle

SkewT-logP 图:使用变换和自定义投影

SkewT-logP diagram: using transforms and custom projections

地形阴影

Topographic hillshading

轴脊#

轴脊

Spines

轴脊放置

Spine placement

丢弃的轴脊

Dropped spines

带有 Spines 的多个 y 轴

Multiple y-axis with Spines

带箭头的中心 spines

Centered spines with arrows

刻度#

自动设置刻度位置

Automatically setting tick positions

刻度之间的中心标签

Center labels between ticks

颜色条刻度线标签

Colorbar Tick Labelling

自定义刻度

Custom Ticker

使用 ConciseDateFormatter 格式化日期刻度

Format date ticks using ConciseDateFormatter

Date Demo Convert

Date Demo Convert

使用循环规则放置日期刻度

Placing date ticks using recurrence rules

日期刻度定位器和格式化器

Date tick locators and formatters

时间序列的自定义刻度格式化器

Custom tick formatter for time series

日期精度和纪元

Date precision and epochs

美元刻度

Dollar ticks

具有 SI 前缀的偏移量和自然数量级

SI prefixed offsets and natural order of magnitudes

Fig Axes Customize Simple

Fig Axes Customize Simple

主刻度和副刻度

Major and minor ticks

多层(嵌套)刻度

Multilevel (nested) ticks

默认刻度格式化程序

The default tick formatter

刻度格式器

Tick formatters

刻度定位器

Tick locators

将默认的 y 轴刻度标签设置在右侧

Set default y-axis tick labels on the right

从值的列表设置刻度标签

Setting tick labels from a list of values

将 x 轴刻度标签移动到顶部

Move x-axis tick labels to the top

旋转的刻度标签

Rotated tick labels

修复过多的刻度

Fixing too many ticks

单位#

这些示例涵盖了 Matplotlib 中单位的多种表示形式.

带单位的注释

Annotation with units

Artist 测试

Artist tests

带单位的条形图演示

Bar demo with units

带单位的分组条形图

Group barchart with units

基本单位

Basic units

带单位的椭圆

Ellipse with units

Evans 测试

Evans test

弧度刻度

Radian ticks

英寸和厘米

Inches and centimeters

单位处理

Unit handling

在图形用户界面中嵌入 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

小部件#

如何在 matplotlib 中编写原始的,但与 GUI 无关的小部件的示例

带注释的光标

Annotated cursor

按钮

Buttons

复选按钮

Check buttons

光标

Cursor

套索选择器

Lasso Selector

菜单

Menu

鼠标光标

Mouse Cursor

多光标

Multicursor

使用多边形选择器从集合中选择索引

Select indices from a collection using polygon selector

多边形选择器

Polygon Selector

单选按钮

Radio Buttons

使用 RangeSlider 进行图像缩放

Image scaling using a RangeSlider

矩形和椭圆选择器

Rectangle and ellipse selectors

滑块

Slider

将滑块捕捉到离散值

Snap sliders to discrete values

跨度选择器

Span Selector

文本框

Textbox

Userdemo#

subplot2grid 演示

subplot2grid demo

GridSpec 演示

GridSpec demo

嵌套的 GridSpecs

Nested GridSpecs

简单图例 01

Simple Legend01

简单图例 02

Simple Legend02

Gallery generated by Sphinx-Gallery