matplotlib.patches.Ellipse#
- class matplotlib.patches.Ellipse(xy, width, height, *, angle=0, **kwargs)[源代码][源代码]#
基类:
Patch
一个无标度椭圆。
- 参数:
- xy(浮点数, 浮点数)
椭圆中心的xy坐标。
- 宽度浮动
水平轴的总长度(直径)。
- 高度浮动
垂直轴的总长度(直径)。
- 角度float, 默认值: 0
逆时针旋转的度数。
注释
有效的关键字参数是:
属性
描述
一个过滤函数,它接受一个 (m, n, 3) 的浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组和两个从图像左下角开始的偏移量
未知
布尔值
抗锯齿
或 aa布尔值或无
CapStyle
或 {'butt', 'projecting', 'round'}BboxBase
或 None布尔值
补丁或(路径,变换)或无
edgecolor
或 eccolor or None
facecolor
或 fccolor or None
布尔值
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
布尔值
JoinStyle
或 {'miter', 'round', 'bevel'}对象
线型
或 ls{'-', '--', '-.', ':', '', (偏移, 开关序列), ...}
linewidth
或 lw浮点数或无
布尔值
None 或 bool 或 float 或 callable
布尔值
(scale: float, length: float, randomness: float)
布尔值或无
str
布尔值
浮动
- property angle#
返回椭圆的角度。
- property center#
返回椭圆的中心。
- get_patch_transform()[源代码][源代码]#
返回将补丁坐标映射到数据坐标的
Transform
实例。例如,可以通过提供单位圆的坐标和将坐标(补丁坐标)缩放5倍的变换来定义一个表示半径为5的圆的补丁。
- property height#
返回椭圆的高度。
- 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>, height=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[源代码]#
一次性设置多个属性。
支持的属性有
属性
描述
一个过滤函数,它接受一个 (m, n, 3) 的浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组和两个从图像左下角开始的偏移量
标量或None
浮动
布尔值
抗锯齿
或 aa布尔值或无
CapStyle
或 {'butt', 'projecting', 'round'}(浮点数, 浮点数)
BboxBase
或 None布尔值
补丁或(路径,变换)或无
edgecolor
或 eccolor or None
facecolor
或 fccolor or None
布尔值
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
浮动
布尔值
JoinStyle
或 {'miter', 'round', 'bevel'}对象
线型
或 ls{'-', '--', '-.', ':', '', (偏移, 开关序列), ...}
linewidth
或 lw浮点数或无
布尔值
None 或 bool 或 float 或 callable
布尔值
(scale: float, length: float, randomness: float)
布尔值或无
str
布尔值
浮动
浮动
- property width#
返回椭圆的宽度。