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.BoxStylestr或 等级 名字 阿特斯 圆圈 circlepad=0.3 DArrow darrowpad=0.3 LArrow larrowpad=0.3 RArrow rarrowpad=0.3 回合 round焊盘=0.3,圆角尺寸=无 第四回合 round4焊盘=0.3,圆角尺寸=无 圆齿 roundtooth衬垫=0.3,齿尺寸=无 锯齿形 sawtooth衬垫=0.3,齿尺寸=无 正方形 squarepad=0.3 - mutation_scale浮点,默认值:1
应用于填充样式的缩放因子。
- mutation_aspect可选浮动
在变异之前,矩形的高度将被该值压缩,并且变异的长方体将被它的倒数拉伸。例如,这允许不同的水平和垂直填充。
其他参数: - **kwargs :
Patch性质修补程序属性 财产 描述 agg_filter一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。 alpha浮动或无 animated布尔 antialiased或者aa未知的 capstyle“对接”、“圆形”、“突出” clip_boxBboxclip_on布尔 clip_path面片或(路径、变换)或无 color颜色 contains未知的 edgecolor或ec颜色或无或“自动” facecolor或fc颜色或无 figureFigurefill布尔 gidSTR hatch'/'、''、''、'-'、'+'、'X'、'O'、'O'、'、'、'*' in_layout布尔 joinstyle'miter'、'round'、'bevel' label对象 linestyle或ls'-'、'-'、'-'、'-'、':'、'、'、'(偏移量、开/关顺序)、… linewidth或lw浮动或无 path_effectsAbstractPathEffectpicker无、布尔或可呼叫 rasterized布尔或无 sketch_params(比例:浮动,长度:浮动,随机性:浮动) snap布尔或无 transformTransformurlSTR 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.BoxStylestr或 等级 名字 阿特斯 圆圈 circlepad=0.3 DArrow darrowpad=0.3 LArrow larrowpad=0.3 RArrow rarrowpad=0.3 回合 round焊盘=0.3,圆角尺寸=无 第四回合 round4焊盘=0.3,圆角尺寸=无 圆齿 roundtooth衬垫=0.3,齿尺寸=无 锯齿形 sawtooth衬垫=0.3,齿尺寸=无 正方形 squarepad=0.3 - mutation_scale浮点,默认值:1
应用于填充样式的缩放因子。
- mutation_aspect可选浮动
在变异之前,矩形的高度将被该值压缩,并且变异的长方体将被它的倒数拉伸。例如,这允许不同的水平和垂直填充。
其他参数: - **kwargs :
Patch性质修补程序属性 财产 描述 agg_filter一种过滤函数,它接受一个(m,n,3)浮点数组和一个dpi值,并返回一个(m,n,3)数组。 alpha浮动或无 animated布尔 antialiased或者aa未知的 capstyle“对接”、“圆形”、“突出” clip_boxBboxclip_on布尔 clip_path面片或(路径、变换)或无 color颜色 contains未知的 edgecolor或ec颜色或无或“自动” facecolor或fc颜色或无 figureFigurefill布尔 gidSTR hatch'/'、''、''、'-'、'+'、'X'、'O'、'O'、'、'、'*' in_layout布尔 joinstyle'miter'、'round'、'bevel' label对象 linestyle或ls'-'、'-'、'-'、'-'、':'、'、'、'(偏移量、开/关顺序)、… linewidth或lw浮动或无 path_effectsAbstractPathEffectpicker无、布尔或可呼叫 rasterized布尔或无 sketch_params(比例:浮动,长度:浮动,随机性:浮动) snap布尔或无 transformTransformurlSTR 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
框样式的名称。(可选)后跟逗号和逗号分隔的属性列表。这些属性也可以作为关键字参数单独传递。
以下框样式可用:
等级 名字 阿特斯 圆圈 circlepad=0.3 DArrow darrowpad=0.3 LArrow larrowpad=0.3 RArrow rarrowpad=0.3 回合 round焊盘=0.3,圆角尺寸=无 第四回合 round4焊盘=0.3,圆角尺寸=无 圆齿 roundtooth衬垫=0.3,齿尺寸=无 锯齿形 sawtooth衬垫=0.3,齿尺寸=无 正方形 squarepad=0.3 - **kwargs
框样式的其他属性。支持的参数见上表。
实例
set_boxstyle("round,pad=0.2") set_boxstyle("round", pad=0.2)