matplotlib.patches.Rectangle¶
-
class
matplotlib.patches.
Rectangle
(xy, width, height, angle=0.0, **kwargs)[源代码]¶ -
通过定位点定义的矩形 xy 及其 宽度 和 高度 .
矩形从
xy[0]
到xy[0] + width
在x方向和从xy[1]
到xy[1] + height
在y方向。:: +------------------+ : | | : height | : | | : (xy)---- width -----+
人们可以想象 xy 作为左下角,但哪个角 xy 实际上取决于轴的方向和符号 宽度 和 高度 例如 xy 如果x轴反转或者 宽度 是阴性。
参数: - xy(浮标,浮标)
锚定点。
- width浮动
矩形宽度。
- height浮动
矩形高度。
- angle浮点,默认值:0
以度为单位逆时针旋转 xy .
其他参数: - **kwargs :
Patch
性质修补程序属性 财产 描述 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
浮动
-
__init__
(xy, width, height, angle=0.0, **kwargs)[源代码]¶ 参数: - xy(浮标,浮标)
锚定点。
- width浮动
矩形宽度。
- height浮动
矩形高度。
- angle浮点,默认值:0
以度为单位逆时针旋转 xy .
其他参数: - **kwargs :
Patch
性质修补程序属性 财产 描述 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
浮动
-
__module__
= 'matplotlib.patches'¶
-
get_patch_transform
()[源代码]¶ 返回
Transform
实例将面片坐标映射到数据坐标。例如,可以通过为单位圆提供坐标来定义表示半径为5的圆的面片,以及将坐标(面片坐标)缩放5的变换。
-
set_bounds
(*args)[源代码]¶ 将矩形的边界设置为 left , 底部 , 宽度 , 高度 .
这些值可以作为单独的参数或元组传递:
set_bounds(left, bottom, width, height) set_bounds((left, bottom, width, height))
-
property
xy
¶ 以元组形式返回矩形的左下坐标。