Version 3.3.3
matplotlib
Fork me on GitHub
  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

导航

  • 索引
  • 模块 |
  • home| 
  • contents »
  • 绘图示例

目录

  • 绘图示例
    • 线条、线条和标记
    • 图像、轮廓和场
    • 子图、轴和图形
    • 统计
    • 饼图和极坐标图
    • 文本、标签和注释
    • Pyplot
    • 颜色
    • 形状和集合
    • 样式表
    • 轴栅
    • 轴心艺术家
    • 展柜
    • 动画
    • 事件处理
    • 头版
    • 其他
    • 三维绘图
    • 我们最喜欢的食谱
    • 规模
    • 特色地块
    • 小技巧
    • 单位
    • 在图形用户界面中嵌入matplotlib
    • 用户演示
    • 小部件

Related Topics

  • Documentation overview

绘图示例¶

这个图库包含了许多可以使用matplotlib执行的操作的示例。单击任何图像以查看完整图像和源代码。

有关更长的教程,请参阅 tutorials page . 你也可以找到 external resources 和A FAQ 在我们 user guide .

线条、线条和标记¶

Stacked bar chart

堆积条形图¶

Grouped bar chart with labels

带标签的分组条形图¶

Horizontal bar chart

水平条形图¶

Broken Barh

Broken Barh¶

Plotting categorical variables

绘制分类变量¶

Plotting the coherence of two signals

绘制两个信号的相干性¶

CSD Demo

CSD演示¶

Curve with error band

带误差带的曲线¶

Errorbar limit selection

误差条限制选择¶

Errorbar subsampling

误差条子采样¶

EventCollection Demo

EventCollection演示¶

Eventplot Demo

事件图演示¶

Filled polygon

填充多边形¶

Filling the area between lines

填充线条之间的区域¶

Fill Betweenx Demo

Fill Betweenx演示¶

Hatch-filled histograms

填充图案填充直方图¶

Bar chart with gradients

带渐变的条形图¶

Discrete distribution as horizontal bar chart

离散分布水平条形图¶

Join styles and cap styles

连接样式和封口样式¶

Customizing dashed line styles

自定义虚线样式¶

Linestyles

直线运动¶

Marker reference

标记引用¶

Markevery Demo

市场演示¶

prop_cycle property markevery in rcParams

属性循环属性markevery in rcParams¶

Plotting masked and NaN values

绘制遮罩值和NaN值¶

Multicolored lines

多色线条¶

Psd Demo

PSD演示¶

Scatter Custom Symbol

散点图自定义符号¶

Scatter Demo2

散射DEMO2¶

Scatter plot with histograms

直方图散点图¶

Scatter Masked

散射屏蔽¶

Scatter plot with pie chart markers

饼图标记散点图¶

Marker examples

标记示例¶

Scatter Symbol

散布符号¶

Scatter plots with a legend

带图例的散点图¶

Simple Plot

简单情节¶

Using span_where

使用Span_Where¶

Spectrum Representations

频谱表示¶

Stackplots and streamgraphs

堆栈图和流图¶

Stem Plot

树干图¶

Step Demo

步骤演示¶

Creating a timeline with lines, dates, and text

创建带有线条、日期和文本的时间线¶

hlines and vlines

H线和V线¶

Cross- and Auto-Correlation Demo

交叉和自相关演示¶

图像、轮廓和场¶

Affine transform of an image

图像的仿射变换¶

Barb Demo

巴布演示¶

Barcode Demo

条形码演示¶

Contour Corner Mask

轮廓角遮罩¶

Contour Demo

轮廓演示¶

Contour Image

轮廓图像¶

Contour Label Demo

轮廓标签演示¶

Contourf Demo

轮廓演示¶

Contourf Hatching

轮廓线图案填充¶

Contourf and log color scale

轮廓和原木色标¶

BboxImage Demo

BBOX图像演示¶

Figimage Demo

图像演示¶

Creating annotated heatmaps

创建带注释的热图¶

Image antialiasing

图像抗锯齿¶

Clipping images with patches

用补丁剪辑图像¶

Image Demo

图像演示¶

Image Masked

图像掩码¶

Image Nonuniform

图像不均匀¶

Blend transparency with color in 2-D images

在二维图像中混合透明度和颜色¶

Modifying the coordinate formatter

修改坐标格式设置工具¶

Interpolations for imshow

imshow插值¶

Contour plot of irregularly spaced data

不规则间隔数据的等值线图¶

Layer Images

图层图像¶

Matshow

马赛¶

Multi Image

多图像¶

Pcolor Demo

彩色显示¶

pcolormesh grids and shading

pColor网格和着色¶

pcolormesh

彩色网格¶

Streamplot

流线图¶

QuadMesh Demo

四方演示¶

Advanced quiver and quiverkey functions

高级quiver和quiverkey函数¶

Quiver Simple Demo

震颤简单演示¶

Shading example

着色示例¶

Spectrogram Demo

光谱图演示¶

Spy Demos

间谍演示¶

Tricontour Demo

TrimCuto演示¶

Tricontour Smooth Delaunay

三角肌平滑肌¶

Tricontour Smooth User

三角肌光滑使用者¶

Trigradient Demo

三角演示¶

Triinterp Demo

三联演示¶

Tripcolor Demo

TrPiLooDemo¶

Triplot Demo

三重情节演示¶

Watermark image

水印图像¶

子图、轴和图形¶

Aligning Labels

对齐标签¶

Axes box aspect

轴盒纵横比¶

Axes Demo

轴演示¶

Controlling view limits using margins and sticky_edges

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

Axes Props

轴线支柱¶

Axes Zoom Effect

轴缩放效果¶

axhspan Demo

AXHSPAN演示¶

Axis Equal Demo

轴相等演示¶

Axis Label Position

轴标签位置¶

Broken Axis

断轴¶

Placing Colorbars

放置颜色条¶

Custom Figure subclasses

自定义图形子类¶

Resizing axes with constrained layout

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

Resizing axes with tight layout

调整紧密布局的轴的大小¶

Different scales on the same axes

同一轴上的不同比例¶

Figure Title

图形标题¶

Creating adjacent subplots

创建相邻子批次¶

Geographic Projections

地理预测¶

Combining two subplots using subplots and GridSpec

使用子图和gridspec组合两个子图¶

Using Gridspec to make multi-column/row subplot layouts

使用gridspec制作多列/行子批次布局¶

Nested Gridspecs

嵌套网格规格¶

Invert Axes

倒轴¶

Multiple Figs Demo

多个Figs演示¶

Secondary Axis

次轴¶

Shared Axis Demo

共享轴演示¶

Multiple subplots

多个子批次¶

Basic Subplot Demo

基本子批次演示¶

Subplot Toolbar

子图工具栏¶

Subplots Adjust

子图调整¶

Creating multiple subplots using ``plt.subplots``

使用创建多个子批次 plt.subplots¶

Plots with different scales

不同比例尺的图¶

Zoom region inset axes

缩放区域插入轴¶

统计¶

Percentiles as horizontal bar chart

百分比作为水平条形图¶

Artist customization in box plots

盒形图中的艺术家自定义¶

Box plots with custom fill colors

带有自定义填充颜色的方框图¶

Boxplots

箱形图¶

Box plot vs. violin plot comparison

盒图与小提琴图比较¶

Boxplot drawer function

箱线图抽屉功能¶

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

包括误差线的上限和下限¶

Creating boxes from error bars using PatchCollection

使用PatchCollection从错误栏创建框¶

Hexbin Demo

Hexbin演示¶

Histograms

直方图¶

Using histograms to plot a cumulative distribution

使用柱状图绘制累积分布¶

Some features of the histogram (hist) function

直方图(hist)函数的一些特征¶

Demo of the histogram function's different ``histtype`` settings

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

The histogram (hist) function with multiple data sets

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

Producing multiple histograms side by side

并排生成多个柱状图¶

Violin plot basics

小提琴绘图基础¶

饼图和极坐标图¶

Basic pie chart

基本饼图¶

Pie Demo2

饼状二氧化物¶

Bar of pie

馅饼棒¶

Nested pie charts

嵌套饼图¶

Labeling a pie and a donut

给馅饼和甜甜圈加标签¶

Bar chart on polar axis

极轴柱状图¶

Polar Demo

极地演示¶

Polar Legend

极地传说¶

Scatter plot on polar axis

极轴散点图¶

文本、标签和注释¶

Using accented text in matplotlib

在matplotlib中使用强调文字¶

Annotating Plots

注释绘图¶

Arrow Demo

箭头演示¶

Arrow Simple Demo

箭头简单演示¶

Auto-wrapping text

自动换行文字¶

Composing Custom Legends

编写自定义图例¶

Date tick labels

日期刻度线标签¶

Custom tick formatter for time series

时间序列的自定义刻度格式设置工具¶

Demo Annotation Box

演示注释框¶

Demo Text Path

演示文本路径¶

Demo Text Rotation Mode

演示文本旋转模式¶

The difference between \\dfrac and \\frac

\dfrac和\frac之间的区别¶

Labeling ticks using engineering notation

使用工程符号标记记号¶

Fancyarrow Demo

范奇亚罗演示¶

Fancytextbox Demo

FancyTextBox演示¶

Figure legend demo

图图例演示¶

Configuring the font family

配置字体系列¶

Using a ttf font file in Matplotlib

在matplotlib中使用ttf字体文件¶

Font table

字体表¶

Fonts demo (object-oriented style)

字体演示(面向对象样式)¶

Fonts demo (kwargs)

字体演示(Kwargs)¶

Legend using pre-defined labels

使用预定义标签的图例¶

Legend Demo

图例演示¶

Artist within an artist

艺术家内部的艺术家¶

A mathtext image as numpy array

数学文本图像作为numpy数组¶

Mathtext Demo

数学文本演示¶

Mathtext Examples

MathText示例¶

Multiline

多线¶

Rainbow text

彩虹文本¶

STIX Fonts Demo

STIX字体演示¶

Rendering math equations using TeX

用TeX绘制数学方程¶

Precise text layout

精确文本布局¶

Controlling style of text and labels using a dictionary

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

Default text rotation demonstration

默认文本旋转演示¶

Text Rotation Relative To Line

相对于线条的文本旋转¶

Title positioning

标题定位¶

Unicode minus

Unicode减去¶

Usetex Baseline Test

USETEX基线测试¶

Usetex Fonteffects

usetex字体效果¶

Text watermark

文本水印¶

Pyplot¶

Align y-labels

对齐Y标签¶

Annotate Transform

注释转换¶

Annotating a plot

标注绘图¶

Annotation Polar

注释极坐标¶

Auto Subplots Adjust

自动子批次调整¶

Infinite lines

无限长的线¶

Boxplot Demo

箱形图演示¶

Dollar Ticks

美元蜱¶

Fig Axes Customize Simple

图轴自定义简单¶

Simple axes labels

简单轴标签¶

Adding lines to figures

向图形添加线条¶

plot() format string

plot()格式字符串¶

Pyplot Mathtext

PyPrand数学模型¶

Pyplot Simple

简单的PyPrPro¶

Pyplot Text

Pyplot 文本¶

Pyplot Three

PyPrPro三¶

Pyplot Two Subplots

绘制两个子图¶

Text Commands

文本命令¶

Text Layout

文本布局¶

What's New 1 Subplot3d

新功能1 Subplot3d¶

Fill Between

填满¶

What's New 0.98.4 Legend

新增0.98.4传奇¶

What's New 0.99 Axes Grid

新功能0.99轴网格¶

What's New 0.99 Mplot3d

新增功能0.99 Mplot3d¶

What's New 0.99 Spines

新增0.99刺¶

颜色¶

有关Matplotlib中可用的颜色映射及其属性的详细信息,请参见 colormaps tutorial .

Color Demo

色彩演示¶

Color by y-value

按y值着色¶

Colors in the default property cycle

默认属性周期中的颜色¶

Colorbar

测控条¶

Colormap reference

颜色映射参考¶

Creating a colormap from a list of colors

从颜色列表创建颜色映射¶

List of named colors

命名颜色列表¶

形状和集合¶

Arrow guide

箭头指南¶

Reference for Matplotlib artists

Matplotlib艺术家参考¶

Line, Poly and RegularPoly Collection with autoscaling

带自动缩放功能的线条、多边形和规则多边形集合¶

Compound path

复合路径¶

Dolphins

海豚¶

Mmh Donuts!!!

MMH甜甜圈!!!!¶

Ellipse Collection

椭圆系列¶

Ellipse Demo

椭圆演示¶

Drawing fancy boxes

画漂亮的盒子¶

Hatch Demo

舱口演示¶

Line Collection

线路采集¶

Marker Path

标记路径¶

Circles, Wedges and Polygons

圆、楔和多边形¶

PathPatch object

PathPatch对象¶

Bezier Curve

贝塞尔曲线¶

Scatter plot

散点图¶

样式表¶

Bayesian Methods for Hackers style sheet

黑客风格表的贝叶斯方法¶

Dark background style sheet

深色背景样式表¶

FiveThirtyEight style sheet

五毛八样式表¶

ggplot style sheet

ggplot样式表¶

Grayscale style sheet

灰度样式表¶

Solarized Light stylesheet

日光灯样式表¶

Style sheets reference

样式表参考¶

轴栅¶

Demo Anchored Direction Arrow

演示锚定方向箭头¶

Demo Axes Divider

演示轴分隔符¶

Demo Axes Grid

演示轴栅格¶

Demo Axes Grid2

演示轴GRID2¶

`.HBoxDivider` demo

HBoxDivider 演示¶

Demo Axes RGB

演示轴RGB¶

Demo Colorbar of Inset Axes

演示插入轴的颜色条¶

Colorbar with `.AxesDivider`

色条 AxesDivider¶

Controlling the position and size of colorbars with Inset Axes

用插入轴控制颜色条的位置和大小¶

Demo Edge Colorbar

演示边缘颜色栏¶

Demo Fixed Size Axes

演示固定尺寸轴¶

Demo Imagegrid Aspect

演示ImageGrid工具¶

Inset Locator Demo

插入定位器演示¶

Inset Locator Demo2

插入定位器演示2¶

Make Room For Ylabel Using Axesgrid

使用axesgrid为ylabel腾出空间¶

Parasite Simple

单纯寄生虫¶

Parasite Simple2

寄生虫单纯形2¶

Scatter Histogram (Locatable Axes)

散点直方图(可定位轴)¶

Simple Anchored Artists

简单锚定艺术家¶

Simple Axes Divider 1

简单轴分隔符1¶

Simple Axes Divider 3

简单轴分隔符3¶

Simple ImageGrid

简单ImageGrid¶

Simple ImageGrid 2

简单图像网格2¶

Simple Axisline4

简单轴线4¶

Simple Colorbar

简单彩条¶

轴心艺术家¶

Axis Direction Demo Step01

轴方向演示步骤01¶

Axis Direction Demo Step02

轴方向演示步骤02¶

Axis Direction Demo Step03

轴方向演示步骤03¶

Axis Direction Demo Step04

轴方向演示步骤04¶

Demo Axis Direction

演示轴方向¶

Axis line styles

轴线样式¶

Curvilinear grid demo

曲线网格演示¶

Demo Curvelinear Grid2

演示曲线网格2¶

:mod:`mpl_toolkits.axisartist.floating_axes` features

mpl_toolkits.axisartist.floating_axes 特征¶

Demo Floating Axis

演示浮动轴¶

Parasite Axes demo

寄生轴演示¶

Parasite axis demo

寄生虫轴演示¶

Demo Ticklabel Alignment

演示TickLabel对齐¶

Demo Ticklabel Direction

演示TickLabel方向¶

Simple Axis Direction01

简单轴方向01¶

Simple Axis Direction03

简单轴方向03¶

Simple Axis Pad

简单轴垫¶

Simple Axisartist1

简单轴对称1¶

Simple Axisline

简单轴线¶

Simple Axisline2

简单轴线2¶

Simple Axisline3

简单轴线3¶

展柜¶

Anatomy of a figure

人体解剖学¶

Bachelor's degrees by gender

按性别划分的学士学位¶

Firefox

火狐¶

Integral as the area under a curve

积分为曲线下的面积¶

Shaded & power normalized rendering

阴影和功率标准化渲染¶

XKCD

XKCD¶

动画¶

Decay

腐朽¶

Animated histogram

动画柱状图¶

pyplot animation

Pyplot动画¶

The Bayes update

Bayes更新¶

The double pendulum problem

双摆问题¶

Animated image using a precomputed list of images

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

Frame grabbing

帧抓取¶

Rain simulation

模拟降雨¶

Animated 3D random walk

动画三维随机行走¶

Animated line plot

动画线图¶

Oscilloscope

示波器¶

MATPLOTLIB **UNCHAINED**

MATPLOTLIB UNCHAINED¶

事件处理¶

Matplotlib支架 event handling 使用一个与GUI无关的事件模型,您可以连接到Matplotlib事件,而不知道Matplotlib最终将插入什么用户界面。这有两个优点:您编写的代码更易于移植,Matplotlib事件知道数据坐标空间以及事件发生在哪个轴上,因此您不必为从画布空间到数据空间的低级转换细节而烦恼。还包括对象选取示例。

Close Event

关闭事件¶

Coords demo

坐标演示¶

Data Browser

数据浏览器¶

Figure Axes Enter Leave

图形轴输入离开¶

Interactive functions

交互功能¶

Image Slices Viewer

图像切片查看器¶

Keypress Demo

按键演示¶

Lasso Demo

套索演示¶

Legend Picking

图例拾取¶

Looking Glass

看格拉斯¶

Path Editor

路径编辑器¶

Pick Event Demo

拾取事件演示¶

Pick Event Demo2

选择事件演示2¶

Pipong

皮蓬¶

Poly Editor

多边形编辑器¶

Pong

乒乓球¶

Resampling Data

重采样数据¶

Timers

计时器¶

Trifinder Event Demo

Trifinder事件演示¶

Viewlims

视界¶

Zoom Window

窗口缩放¶

头版¶

Frontpage 3D example

FrontPage 3D示例¶

Frontpage contour example

FrontPage轮廓示例¶

Frontpage histogram example

FrontPage柱状图示例¶

Frontpage plot example

FrontPage绘图示例¶

其他¶

Agg Buffer

AGG缓冲液¶

Agg Buffer To Array

agg缓冲区到数组¶

Anchored Artists

锚定艺术家¶

Changing colors of lines intersecting a box

更改与方框相交的线条的颜色¶

Manual Contour

人工轮廓¶

Coords Report

库尔德报告¶

Cross hair cursor

十字光标¶

Custom projection

自定义投影¶

Customize Rc

定制钢筋混凝土¶

Demo Agg Filter

演示AGG滤波器¶

Ribbon Box

色带盒¶

Fill Spiral

填充螺旋¶

Findobj Demo

Findobj演示¶

Font indexing

字体索引¶

Font properties

字体属性¶

Building histograms using Rectangles and PolyCollections

使用矩形和多集合构建柱状图¶

Hyperlinks

超链接¶

Image Thumbnail

图像缩略图¶

Plotting with keywords

用关键字绘图¶

Load converter

负载转换器¶

Matplotlib logo

Matplotlib徽标¶

Multipage PDF

多页PDF¶

Multiprocess

多进程¶

Patheffect Demo

模拟演示¶

Print Stdout

打印标准输出¶

Pythonic Matplotlib

纵膈肌松解术¶

Rasterization Demo

栅格化演示¶

Set and get properties

设置和获取属性¶

SVG Filter Line

SVG滤波线¶

SVG Filter Pie

SVG滤饼¶

Table Demo

表格演示¶

transforms.offset_copy

transforms.offset_copy¶

Zorder Demo

Zorder演示¶

三维绘图¶

Plot 2D data on 3D plot

在三维图上绘制二维数据¶

Demo of 3D bar charts

三维条形图演示¶

Create 2D bar graphs in different planes

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

Demonstrates plotting contour (level) curves in 3D

演示在3D中绘制轮廓(水平)曲线¶

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

演示使用extend3d选项在三维中绘制轮廓(水平)曲线¶

Projecting contour profiles onto a graph

将轮廓轮廓投影到图形上¶

Filled contours

填充等高线¶

Projecting filled contour onto a graph

将填充轮廓投影到图形上¶

Custom hillshading in a 3D surface plot

三维曲面图中的自定义山体阴影¶

Create 3D histogram of 2D data

创建二维数据的三维柱状图¶

Parametric Curve

参数曲线¶

Lorenz Attractor

洛伦兹吸引子¶

2D and 3D *Axes* in same *Figure*

二维与三维 Axes 在同一 图形¶

Automatic Text Offsetting

自动文本偏移¶

Draw flat objects in 3D plot

在三维绘图中绘制平面对象¶

Generate polygons to fill under 3D line graph

在三维线图下生成要填充的多边形¶

3D quiver plot

三维颤动图¶

Rotating a 3D plot

旋转三维绘图¶

3D scatterplot

三维散点图¶

3D plots as subplots

三维绘图作为子图¶

3D surface (color map)

3D表面(彩色地图)¶

3D surface (solid color)

3D表面(纯色)¶

3D surface (checkerboard)

3D表面(棋盘)¶

3D surface with polar coordinates

极坐标三维曲面¶

Text annotations in 3D

三维文本注释¶

Triangular 3D contour plot

三角形三维轮廓图¶

Triangular 3D filled contour plot

三角形三维填充轮廓图¶

Triangular 3D surfaces

三角形三维曲面¶

More triangular 3D surfaces

更多三角形三维曲面¶

3D voxel / volumetric plot

三维体素/体积图¶

3D voxel plot of the numpy logo

Numpy徽标的三维体素图¶

3D voxel / volumetric plot with rgb colors

带有RGB颜色的三维体素/体积图¶

3D voxel / volumetric plot with cylindrical coordinates

三维体素/圆柱坐标立体图¶

3D wireframe plot

三维线框图¶

Rotating 3D wireframe plot

旋转三维线框图¶

3D wireframe plots in one direction

一个方向的三维线框图¶

我们最喜欢的食谱¶

下面是一个简短的教程、示例和代码片段的集合,说明了一些有用的习语和技巧,以使更时髦的人物和克服一些Matplotlib缺点。

Centered spines with arrows

带箭头的居中脊椎¶

Fixing common date annoyances

修复常见的约会烦恼¶

Easily creating subplots

轻松创建子批次¶

Fill Between and Alpha

填充到和Alpha之间¶

Placing text boxes

放置文本框¶

Sharing axis limits and views

共享轴限制和视图¶

规模¶

这些例子涵盖了如何在Matplotlib中处理不同的比例。

Loglog Aspect

言语格格¶

Custom scale

自定义比例尺¶

Log Bar

原木杆¶

Log Demo

日志演示¶

Log Axis

原木轴线¶

Logit Demo

Logit演示¶

Exploring normalizations

探索规范化¶

Scales

规模¶

Symlog Demo

SCOLLO演示¶

特色地块¶

Hillshading

丘陵地形¶

Anscombe's quartet

安斯科姆四重奏¶

Hinton diagrams

Hinton图¶

Left ventricle bullseye

左心室大泡¶

===

MRI¶

MRI With EEG

磁共振脑电图¶

Radar chart (aka spider or star chart)

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

The Sankey class

Sankey类¶

Long chain of connections using Sankey

使用sankey的长连接链¶

Rankine power cycle

朗肯动力循环¶

SkewT-logP diagram: using transforms and custom projections

歪斜logp图:使用转换和自定义投影¶

Topographic hillshading

地形阴影¶

小技巧¶

Automatically setting tick labels

自动设置刻度线标签¶

Centering labels between ticks

刻度之间的标签居中¶

Colorbar Tick Labelling Demo

彩条勾标签演示¶

Custom Ticker1

自定义TICK1¶

Formatting date ticks using ConciseDateFormatter

使用ConciseDataformatter格式化日期刻度¶

Date Demo Convert

演示转换日期¶

Date Demo Rrule

日期演示规则¶

Date Index Formatter

日期索引格式化程序¶

Date Precision and Epochs

日期精度和年代¶

Major and minor ticks

主次滴答声¶

Multiple Yaxis With Spines

多个有刺的牙龈¶

The default tick formatter

默认刻度格式设置工具¶

Spine Placement Demo

脊椎位置演示¶

Spines

Spines¶

Custom spine bounds

自定义脊椎边界¶

Dropped spines

下垂 spines¶

Tick formatters

滴答格式化程序¶

Tick locators

蜱定位器¶

Set default y-axis tick labels on the right

在右侧设置默认的Y轴刻度标签¶

Setting tick labels from a list of values

从值列表中设置刻度线标签¶

Set default x-axis tick labels on the top

在顶部设置默认的X轴刻度标签¶

Rotating custom tick labels

旋转自定义刻度线标签¶

单位¶

这些例子涵盖了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¶

您可以按照下面的“在somegui.py中嵌入”示例,将matplotlib直接嵌入到用户界面应用程序中。目前matplotlib支持wxpython、pygtk、tkinter和pyqt4/5。

在GUI中嵌入matplotlib时,必须直接使用matplotlib API,而不是pylab/pyplot proceedural接口,因此请查看examples/api目录中使用该API的一些示例代码。

CanvasAgg demo

卡纳瓦格演示¶

Embedding in GTK3 with a navigation toolbar

使用导航工具栏嵌入GTK3¶

Embedding in GTK3

嵌入GTK3¶

Embedding in Qt

QT中的嵌入¶

Embedding in Tk

嵌入Tk¶

Embedding in wx #2

嵌入wx#2¶

Embedding in wx #3

嵌入wx#3¶

Embedding in wx #4

嵌入wx#4¶

Embedding in wx #5

嵌入wx#5¶

Embedding WebAgg

嵌入webagg¶

Fourier Demo WX

傅立叶演示¶

GTK Spreadsheet

GTK电子表格¶

MathText WX

数学文本¶

Matplotlib With Glade 3

带Glade 3的Matplotlib¶

pyplot with GTK

使用GTK进行pyplot¶

SVG Histogram

SVG直方图¶

SVG Tooltip

SVG工具提示¶

Tool Manager

刀具管理器¶

WXcursor Demo

Wx游标演示¶

用户演示¶

Anchored Box01

锚固箱¶

Anchored Box02

锚固箱¶

Anchored Box03

锚固箱¶

Anchored Box04

锚固箱¶

Annotate Explain

注释解释¶

Annotate Simple01

注释simple01¶

Annotate Simple02

注释simple02¶

Annotate Simple03

注释simple03¶

Annotate Simple04

注释simple04¶

Annotate Simple Coord01

注释简单坐标01¶

Annotate Simple Coord02

注释简单坐标02¶

Annotate Simple Coord03

注释简单坐标03¶

Annotate Text Arrow

注释文本箭头¶

Colormap Normalizations

颜色映射规范化¶

Colormap Normalizations Symlognorm

颜色映射规范化符号规范¶

Connect Simple01

连接单工01¶

Connectionstyle Demo

ConnectionStyle演示¶

Custom box styles

自定义方框样式¶

subplot2grid demo

子批次2网格演示¶

GridSpec demo

GridSpec演示¶

Nested GridSpecs

嵌套网格规格¶

Pgf Fonts

PGF字体¶

Pgf Preamble

PGF前导码¶

Pgf Texsystem

PGF-文本系统¶

Simple Annotate01

简单注释01¶

Simple Legend01

简单图例01¶

Simple Legend02

简单图例02¶

小部件¶

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

Buttons

按钮¶

Check Buttons

复选按钮¶

Cursor

光标¶

Lasso Selector Demo

套索选择器演示¶

Menu

菜单¶

Multicursor

多胞体¶

Polygon Selector Demo

多边形选择器演示¶

Radio Buttons

单选按钮¶

Rectangle Selector

矩形选择¶

Slider Demo

滑块演示¶

Span Selector

跨距选择器¶

Textbox

文本框¶

Download all examples in Python source code: gallery_python.zip
Download all examples in Jupyter notebooks: gallery_jupyter.zip

关键词:matplotlib代码示例,codex,python plot,pyplot Gallery generated by Sphinx-Gallery

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2021 The Matplotlib development team.
上次更新时间: 1月 02, 2021 。 创建使用 Doc version v3.3.3-11-g0c8feb04e.