-
在轴上添加一个箭头。
这将绘制一个从
(x, y)
到(x+dx, y+dy)
的箭头。- x, y 浮点数
-
箭头底的 x 和 y 坐标。
- dx, dy 浮点数
-
箭头沿 x 和 y 方向的长度。
- width 浮点数,默认:0.001
-
完整箭头尾部的宽度。
- length_includes_head 布尔值,默认值:假
-
如果在计算长度时要计算头,则为真。
- head_width 浮点数或无,默认:3*width
-
完整箭头的总宽度。
- head_length 浮点数或无,默认值:1.5*head_width
-
箭头的长度。
- shape {'full', 'left', 'right'},默认:'full'
-
绘制 left-half、right-half 或完整箭头。
- overhang 浮点数,默认值:0
-
箭头向后扫过的分数(0 悬垂表示三角形)。可以是负数或大于一。
- head_starts_at_zero 布尔值,默认值:假
-
如果为 True,则头部开始在坐标 0 处绘制,而不是在坐标 0 处结束。
- **kwargs
-
Patch
属性
说明
一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组
unknown
bool
antialiased
布尔或无
CapStyle
bool
补丁或(路径,变换)或无
color
edgecolor
颜色或无
facecolor
颜色或无
bool
str
{'/'、'\'、'|'、'-'、'+'、'x', 'o'、'O'、'.'、'*'}
bool
JoinStyle
object
linestyle
{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
浮点数或无
None 或 bool 或 float 或可调用
bool
(比例:浮点数,长度:浮点数,随机性:浮点数)
布尔或无
str
bool
float
FancyArrow
-
创建的
FancyArrow
参数
返回
注意
生成的箭头受轴纵横比和限制的影响。这可能会产生一个箭头,它的头部与它的茎不成直角。要创建一个箭头,它的头部与它的茎是方形的,例如使用
annotate()
>>> ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0), ... arrowprops=dict(arrowstyle="->"))
用法
matplotlib.pyplot.arrow(x, y, dx, dy, **kwargs)
相关用法
- Python matplotlib.pyplot.arrow()用法及代码示例
- Python matplotlib.pyplot.axis用法及代码示例
- Python matplotlib.pyplot.axline用法及代码示例
- Python matplotlib.pyplot.axvspan用法及代码示例
- Python matplotlib.pyplot.axes用法及代码示例
- Python matplotlib.pyplot.axhline()用法及代码示例
- Python matplotlib.pyplot.angle_spectrum()用法及代码示例
- Python matplotlib.pyplot.step()用法及代码示例
- Python matplotlib.pyplot.subplot2grid用法及代码示例
- Python matplotlib.pyplot.loglog用法及代码示例
- Python matplotlib.pyplot.subplots用法及代码示例
- Python matplotlib.pyplot.rgrids用法及代码示例
- Python matplotlib.pyplot.colormaps用法及代码示例
- Python matplotlib.pyplot.semilogy()用法及代码示例
- Python matplotlib.pyplot.inferno()用法及代码示例
- Python matplotlib.pyplot.tick_params用法及代码示例
- Python matplotlib.pyplot.legend用法及代码示例
- Python matplotlib.pyplot.clabel()用法及代码示例
- Python matplotlib.pyplot.locator_params用法及代码示例
- Python matplotlib.pyplot.savefig用法及代码示例
- Python matplotlib.pyplot.semilogy用法及代码示例
- Python matplotlib.pyplot.pink()用法及代码示例
- Python matplotlib.pyplot.prism()用法及代码示例
- Python matplotlib.pyplot.summer()用法及代码示例
- Python matplotlib.pyplot.subplot用法及代码示例
注:本文由纯净天空筛选整理自matplotlib.org大神的英文原创作品 matplotlib.pyplot.arrow。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。