matplotlib.pyplot.axhspan¶
-
matplotlib.pyplot.
axhspan
(ymin, ymax, xmin=0, xmax=1, **kwargs)[源代码]¶ 在轴上添加水平跨距(矩形)。
矩形从 ymin 到 ymax 默认情况下,x轴是垂直的。可以使用 xmin (默认值:0)和 xmax (默认值:1)以轴为单位;例如。
xmin = 0.5
始终指x轴的中间,而不考虑set_xlim
.参数: - ymin浮动
跨度的下y坐标,以数据单位表示。
- ymax浮动
跨度的上y坐标,以数据单位表示。
- xmin浮点,默认值:0
跨度的下x坐标,以x轴(0-1)为单位。
- xmax浮点,默认值:1
跨度的上x坐标,以x轴(0-1)为单位。
返回: Polygon
从(xmin,ymin)到(xmax,ymax)的水平跨度(矩形)。
其他参数: - **kwargs :
Polygon
性质多边形属性 财产 描述 agg_filter
一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。 alpha
浮动或无 animated
布尔 antialiased
或者aa未知的 capstyle
“对接”、“圆形”、“突出” clip_box
Bbox
clip_on
布尔 clip_path
面片或(路径、变换)或无 color
颜色 contains
未知的 edgecolor
或ec颜色或无或“自动” facecolor
或fc颜色或无 figure
Figure
fill
布尔 gid
STR hatch
'/'、''、''、'-'、'+'、'X'、'O'、'O'、'、'、'*' in_layout
布尔 joinstyle
'miter'、'round'、'bevel' label
对象 linestyle
或ls'-'、'-'、'-'、'-'、':'、'、'、'(偏移量、开/关顺序)、… linewidth
或lw浮动或无 path_effects
AbstractPathEffect
picker
无、布尔或可呼叫 rasterized
布尔或无 sketch_params
(比例:浮动,长度:浮动,随机性:浮动) snap
布尔或无 transform
Transform
url
STR visible
布尔 zorder
浮动
参见
axvspan
- 在轴上添加一个垂直跨度。