示例#

关于我们提供的绘图方法的概述,请参见 图表类型

本页包含示例图表。点击任意图片查看完整图片和源代码。

对于更长的教程,请参阅我们的 教程页面。您还可以在我们的 用户指南 中找到 外部资源常见问题解答

标签化!

您也可以通过 标签 浏览示例图库。

线条、条形和标记#

带有单独条形颜色的条形图

Bar chart with individual bar colors

带有标签的条形图

Bar chart with labels

堆叠柱状图

Stacked bar chart

带标签的分组条形图

Grouped bar chart with labels

水平条形图

Horizontal bar chart

断开的条形图

Broken Barh

CapStyle

CapStyle

绘制分类变量

Plotting categorical variables

绘制两个信号的一致性

Plotting the coherence of two signals

交叉谱密度 (CSD)

Cross spectral density (CSD)

带有误差带的曲线

Curve with error band

误差条限值选择

Errorbar limit selection

误差条子采样

Errorbar subsampling

事件集合演示

EventCollection Demo

事件图演示

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 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

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 demo

等值线填充图案

Contourf hatching

Contourf 和 对数颜色标度

Contourf and log color scale

优化解决方案空间的轮廓

Contouring the solution space of optimizations

BboxImage 演示

BboxImage Demo

图图像演示

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

QuadMesh 演示

QuadMesh Demo

高级箭袋和箭袋键功能

Advanced quiver and quiverkey functions

Quiver 简单演示

Quiver Simple Demo

阴影示例

Shading example

频谱图

Spectrogram

间谍演示

Spy Demos

三重轮廓演示

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 box aspect

坐标轴演示

Axes Demo

使用边距和粘性边缘控制视图限制

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

自定义图表子类

Custom Figure subclasses

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

Resize Axes with constrained layout

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

Resize Axes with tight layout

同一Axes上的不同刻度

Different scales on the same Axes

不同单位中的图形尺寸

Figure size in different units

图表标签:suptitle, supxlabel, supylabel

Figure labels: suptitle, supxlabel, supylabel

相邻子图

Adjacent subplots

地理投影

Geographic Projections

使用 subplots 和 GridSpec 组合两个子图

Combine two subplots using subplots and GridSpec

用于多列/行子图布局的网格规格

Gridspec for multi-column/row subplot layouts

嵌套的网格规格

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 函数

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 演示

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

数学表达式

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 中可用的色图描述,请参阅 色图教程

颜色演示

Color Demo

按y值着色

Color by y-value

默认属性循环中的颜色

Colors in the default property cycle

颜色条

Colorbar

色图参考

Colormap reference

从颜色列表创建一个颜色映射

Create a colormap from a list of colors

从色图中选择单个颜色

Selecting individual colors from a colormap

命名颜色列表

List of named colors

设置颜色透明度的方法

Ways to set a color's alpha value

形状和集合#

Arrow 指南

Arrow guide

Matplotlib 艺术家的参考

Reference for Matplotlib artists

带有自动缩放的线、多边形和正多边形集合

Line, Poly and RegularPoly Collection with autoscaling

复合路径

Compound path

海豚

Dolphins

Mmh 甜甜圈!!!

Mmh Donuts!!!

带方向箭头的椭圆演示

Ellipse with orientation arrow demo

椭圆集合

Ellipse Collection

椭圆演示

Ellipse Demo

绘制花哨的框

Drawing fancy boxes

Hatch 演示

Hatch demo

Hatch 样式参考

Hatch style reference

使用 LineCollection 绘制多条线

Plot multiple lines using a LineCollection

圆、楔形和多边形

Circles, Wedges and Polygons

PathPatch 对象

PathPatch object

贝塞尔曲线

Bezier curve

散点图

Scatter plot

样式表#

黑客的贝叶斯方法样式表

Bayesian Methods for Hackers style sheet

暗背景样式表

Dark background style sheet

FiveThirtyEight 样式表

FiveThirtyEight style sheet

ggplot 样式表

ggplot style sheet

灰度样式表

Grayscale style sheet

Solarized Light 样式表

Solarized Light stylesheet

样式表引用

Style sheets reference

模块 - pyplot#

无限行

Infinite lines

简单绘图

Simple plot

使用 pyplot 的文本和数学文本

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

坐标轴网格2

Axes Grid2

HBoxDivider 和 VBoxDivider 演示

HBoxDivider and VBoxDivider demo

使用 RGBAxes 显示 RGB 通道

Show RGB channels using RGBAxes

带有 AxesDivider 的 Colorbar

Colorbar with AxesDivider

使用嵌入轴控制颜色条的位置和大小

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 locator demo

插入定位器演示 2

Inset locator demo 2

使用 axes_grid 为 ylabel 腾出空间

Make room for ylabel using axes_grid

寄生虫 简单

Parasite Simple

寄生虫 Simple2

Parasite Simple2

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

Align histogram to scatter plot using locatable Axes

简单的锚定艺术家

Simple Anchored Artists

简单的轴分割器 1

Simple Axes Divider 1

简单的轴分割器 3

Simple axes divider 3

简单的图像网格

Simple ImageGrid

简单的 ImageGrid 2

Simple ImageGrid 2

简单轴线4

Simple Axisline4

模块 - axisartist#

轴方向

Axis Direction

轴方向演示

axis_direction demo

轴线样式

Axis line styles

曲线网格演示

Curvilinear grid demo

演示曲线线性网格2

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 自定义轴脊

Custom spines with axisartist

简单轴线

Simple Axisline

简单轴线3

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 无关的事件模型,因此您可以在不了解 Matplotlib 最终连接到哪个用户界面的情况下连接到 Matplotlib 事件。这有两个优点:您编写的代码将更具可移植性,并且 Matplotlib 事件能够感知数据坐标空间和事件发生的轴,因此您无需处理低级变换细节即可从画布空间转换到数据空间。还包括对象拾取的示例。

关闭事件

Close event

鼠标移动和点击事件

Mouse move and click events

十字准线光标

Cross-hair cursor

数据浏览器

Data browser

图/轴进入和离开事件

Figure/Axes enter and leave events

交互功能

Interactive functions

滚动事件

Scroll event

按键事件

Keypress event

Lasso 演示

Lasso Demo

图例选择

Legend picking

镜子

Looking glass

路径编辑器

Path editor

选择事件演示

Pick event demo

选择事件演示 2

Pick event demo 2

多边形编辑器

Polygon editor

Pong

Pong

重采样数据

Resampling Data

计时器

Timers

Trifinder 事件演示

Trifinder Event Demo

视图限制

Viewlims

Zoom 修改其他 Axes

Zoom modifies other Axes

杂项#

锚定艺术家

Anchored Artists

识别艺术家是否相交

Identify whether artists intersect

手动轮廓

Manual Contour

坐标报告

Coords Report

自定义投影

Custom projection

自定义 Rc

Customize Rc

AGG 过滤器

AGG filter

Ribbon box

Ribbon box

直接向图形添加线条

Add lines directly to a figure

填充螺旋

Fill spiral

Findobj 演示

Findobj Demo

字体索引

Font indexing

字体属性

Font properties

使用矩形和多边形集合构建直方图

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 路径效果

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

在不同平面创建二维条形图

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 表面图中的自定义山体阴影

Custom hillshading in a 3D surface plot

3D 误差条

3D errorbars

填充3D线条之间

Fill between 3D lines

填充在3D折线图下

Fill under 3D line graphs

创建二维数据的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 aspect

自定义比例

Custom scale

日志栏

Log Bar

日志演示

Log Demo

Logit 演示

Logit Demo

探索归一化

Exploring normalizations

刻度

Scales

对数轴

Log Axis

Symlog 演示

Symlog Demo

专业图表#

山体阴影

Hillshading

安斯科姆四重奏

Anscombe's quartet

Hinton 图

Hinton diagrams

石川图

Ishikawa Diagram

左心室靶心图

Left ventricle bullseye

MRI 与 EEG

MRI with EEG

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

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

具有多个y轴的脊线

Multiple y-axis with Spines

带有箭头的居中脊柱

Centered spines with arrows

Ticks#

自动设置刻度位置

Automatically setting tick positions

在刻度之间居中标签

Center labels between ticks

颜色条刻度标签

Colorbar Tick Labelling

自定义刻度

Custom Ticker

使用 ConciseDateFormatter 格式化日期刻度

Format date ticks using ConciseDateFormatter

日期演示转换

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

图 轴 自定义 简单

Fig Axes Customize Simple

主刻度和次刻度

Major and minor ticks

多级(嵌套)刻度

Multilevel (nested) ticks

默认的刻度格式化器

The default tick formatter

Tick formatters

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 tests

带有单位的条形图演示

Bar demo with units

按单位分组的条形图

Group barchart with units

基本单位

Basic units

带有单位的椭圆

Ellipse with units

埃文斯测试

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中显示数学文本

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

小部件#

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

带注释的光标

Annotated cursor

按钮

Buttons

检查按钮

Check buttons

光标

Cursor

Lasso 选择器

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

Span Selector

文本框

Textbox

用户演示#

subplot2grid 演示

subplot2grid demo

GridSpec 演示

GridSpec demo

嵌套的 GridSpecs

Nested GridSpecs

简单图例01

Simple Legend01

简单图例02

Simple Legend02

由 Sphinx-Gallery 生成的图库