matplotlib.patches.Circle#

matplotlib.patches.Circle(xy, radius=5, **kwargs)[源代码]#

基类:Ellipse

一个圆形补丁。

在中心 xy = (x, y) 处创建一个真正的圆形,给定 radius

CirclePolygon(它是多边形近似)不同,此方法使用贝塞尔样条曲线,更接近无比例圆形。

有效的关键字参数有:

属性

描述

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

未知

animated

布尔值

antialiased or aa

布尔值或 None

capstyle

CapStyle 或 {'butt', 'projecting', 'round'}

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

color

color

edgecolor or ec

颜色 或 None

facecolor or fc

颜色 或 None

figure

FigureSubFigure

fill

布尔值

gid

字符串

hatch

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

未知

in_layout

布尔值

joinstyle

JoinStyle 或 {'miter', 'round', 'bevel'}

label

对象

linestyle or ls

{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

linewidth or lw

浮点数或 None

mouseover

布尔值

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

transform

变换

url

字符串

visible

布尔值

zorder

浮点数

get_radius()[源代码]#

返回圆的半径。

属性 radius#

返回圆的半径。

set(*, agg_filter=<UNSET>, alpha=<UNSET>, angle=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, center=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, hatch_linewidth=<UNSET>, height=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, radius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[源代码]#

一次性设置多个属性。

支持的属性包括:

属性

描述

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

angle

浮点数

animated

布尔值

antialiased or aa

布尔值或 None

capstyle

CapStyle 或 {'butt', 'projecting', 'round'}

居中

(浮点数, 浮点数)

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

color

color

edgecolor or ec

颜色 或 None

facecolor or fc

颜色 或 None

figure

FigureSubFigure

fill

布尔值

gid

字符串

hatch

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

未知

height

浮点数

in_layout

布尔值

joinstyle

JoinStyle 或 {'miter', 'round', 'bevel'}

label

对象

linestyle or ls

{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

linewidth or lw

浮点数或 None

mouseover

布尔值

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

radius

浮点数

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

transform

变换

url

字符串

visible

布尔值

width

浮点数

zorder

浮点数

set_radius(radius)[源代码]#

设置圆的半径。

参数:
radius浮点数

使用 matplotlib.patches.Circle 的示例#

简单锚定艺术家

简单锚定艺术家

放大镜

放大镜

用补丁裁剪图像

用补丁裁剪图像

锚定艺术家

锚定艺术家

自定义投影

自定义投影

簇状气泡图

簇状气泡图

在三维图中绘制平面对象

在三维图中绘制平面对象

Matplotlib 艺术家参考

Matplotlib 艺术家参考

海豚

海豚

嗯…甜甜圈!!!

嗯…甜甜圈!!!

圆、扇形和多边形

圆、扇形和多边形

图形解剖

图形解剖

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

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

ggplot 样式表

ggplot 样式表

灰度样式表

灰度样式表

Petroff10 样式表

Petroff10 样式表

样式表参考

样式表参考

坐标轴框纵横比

坐标轴框纵横比

AnnotationBbox 演示

AnnotationBbox 演示

变换教程

变换教程

图例指南

图例指南

注解

注解