matplotlib.patches.FancyBboxPatch¶
-
class
matplotlib.patches.
FancyBboxPatch
(xy, width, height, boxstyle='round', bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)[源代码]¶ -
左下角为的矩形周围的一个花哨的方框 xy =( x , y )具有指定的宽度和高度。
FancyBboxPatch
类似于Rectangle
,但它在矩形周围画了一个漂亮的方框。矩形框到花式框的转换委托给中定义的样式类BoxStyle
.参数: - xy浮起,浮起
框的左下角。
- width浮动
盒子的宽度。
- height浮动
盒子的高度。
- 箱型 STR或
matplotlib.patches.BoxStyle
str或 等级 名字 阿特斯 圆圈 circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 回合 round
焊盘=0.3,圆角尺寸=无 第四回合 round4
焊盘=0.3,圆角尺寸=无 圆齿 roundtooth
衬垫=0.3,齿尺寸=无 锯齿形 sawtooth
衬垫=0.3,齿尺寸=无 正方形 square
pad=0.3 - mutation_scale浮点,默认值:1
应用于填充样式的缩放因子。
- mutation_aspect可选浮动
在变异之前,矩形的高度将被该值压缩,并且变异的长方体将被它的倒数拉伸。例如,这允许不同的水平和垂直填充。
其他参数: - **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, boxstyle='round', bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)[源代码]¶ 参数: - xy浮起,浮起
框的左下角。
- width浮动
盒子的宽度。
- height浮动
盒子的高度。
- 箱型 STR或
matplotlib.patches.BoxStyle
str或 等级 名字 阿特斯 圆圈 circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 回合 round
焊盘=0.3,圆角尺寸=无 第四回合 round4
焊盘=0.3,圆角尺寸=无 圆齿 roundtooth
衬垫=0.3,齿尺寸=无 锯齿形 sawtooth
衬垫=0.3,齿尺寸=无 正方形 square
pad=0.3 - mutation_scale浮点,默认值:1
应用于填充样式的缩放因子。
- mutation_aspect可选浮动
在变异之前,矩形的高度将被该值压缩,并且变异的长方体将被它的倒数拉伸。例如,这允许不同的水平和垂直填充。
其他参数: - **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'¶
-
set_bounds
(*args)[源代码]¶ 设置矩形的边界。
呼叫签名:
set_bounds(left, bottom, width, height) set_bounds((left, bottom, width, height))
参数: - 左、下浮动
矩形左下角的坐标。
- 宽度、高度浮动
矩形的宽度/高度。
-
set_boxstyle
(boxstyle=None, **kwargs)[源代码]¶ 设置方框样式。
大多数框样式可以使用属性进一步配置。上一个框样式中的属性不会被重用。
没有争论(或
boxstyle=None
),可用的框样式将作为人类可读的字符串返回。参数: - boxstyleSTR
框样式的名称。(可选)后跟逗号和逗号分隔的属性列表。这些属性也可以作为关键字参数单独传递。
以下框样式可用:
等级 名字 阿特斯 圆圈 circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 回合 round
焊盘=0.3,圆角尺寸=无 第四回合 round4
焊盘=0.3,圆角尺寸=无 圆齿 roundtooth
衬垫=0.3,齿尺寸=无 锯齿形 sawtooth
衬垫=0.3,齿尺寸=无 正方形 square
pad=0.3 - **kwargs
框样式的其他属性。支持的参数见上表。
实例
set_boxstyle("round,pad=0.2") set_boxstyle("round", pad=0.2)