Bases: matplotlib.patches.Patch
A fancy box around a rectangle with lower left at xy = (x, y) with specified width and height.
FancyBboxPatch
is similar to Rectangle
, but it draws a fancy box around the rectangle. The transformation of the rectangle box to the fancy box is delegated to the style classes defined in BoxStyle
.
The lower left corner of the box.
The width of the box.
The height of the box.
matplotlib.patches.BoxStyle
Class Name Attrs CircleThe style of the fancy box. This can either be a
BoxStyle
instance or a string of the style name and optionally comma seprarated attributes (e.g. "Round, pad=0.2"). This string is passed toBoxStyle
to construct aBoxStyle
object. See there for a full documentation.The following box styles are available:
circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 Round round
pad=0.3, rounding_size=None Round4 round4
pad=0.3, rounding_size=None Roundtooth roundtooth
pad=0.3, tooth_size=None Sawtooth sawtooth
pad=0.3, tooth_size=None Square square
pad=0.3
Scaling factor applied to the attributes of the box style (e.g. pad or rounding_size).
The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. For example, this allows different horizontal and vertical padding.
Patch
properties
agg_filter
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha
float or None animated
bool antialiased
or aa unknown capstyle
{'butt', 'round', 'projecting'} clip_box
Bbox
clip_on
bool clip_path
Patch or (Path, Transform) or None color
color contains
unknown edgecolor
or ec color or None or 'auto' facecolor
or fc color or None figure
Figure
fill
bool gid
str hatch
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} in_layout
bool joinstyle
{'miter', 'round', 'bevel'} label
object linestyle
or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} linewidth
or lw float or None path_effects
AbstractPathEffect
picker
None or bool or callable rasterized
bool or None sketch_params
(scale: float, length: float, randomness: float) snap
bool or None transform
Transform
url
str visible
bool zorder
float
__init__
(self, xy, width, height, boxstyle='round', bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)[source]¶
The lower left corner of the box.
The width of the box.
The height of the box.
matplotlib.patches.BoxStyle
Class Name Attrs CircleThe style of the fancy box. This can either be a
BoxStyle
instance or a string of the style name and optionally comma seprarated attributes (e.g. "Round, pad=0.2"). This string is passed toBoxStyle
to construct aBoxStyle
object. See there for a full documentation.The following box styles are available:
circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 Round round
pad=0.3, rounding_size=None Round4 round4
pad=0.3, rounding_size=None Roundtooth roundtooth
pad=0.3, tooth_size=None Sawtooth sawtooth
pad=0.3, tooth_size=None Square square
pad=0.3
Scaling factor applied to the attributes of the box style (e.g. pad or rounding_size).
The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. For example, this allows different horizontal and vertical padding.
Patch
properties
agg_filter
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha
float or None animated
bool antialiased
or aa unknown capstyle
{'butt', 'round', 'projecting'} clip_box
Bbox
clip_on
bool clip_path
Patch or (Path, Transform) or None color
color contains
unknown edgecolor
or ec color or None or 'auto' facecolor
or fc color or None figure
Figure
fill
bool gid
str hatch
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} in_layout
bool joinstyle
{'miter', 'round', 'bevel'} label
object linestyle
or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} linewidth
or lw float or None path_effects
AbstractPathEffect
picker
None or bool or callable rasterized
bool or None sketch_params
(scale: float, length: float, randomness: float) snap
bool or None transform
Transform
url
str visible
bool zorder
float
__module__
= 'matplotlib.patches'¶
__str__
(self)[source]¶
Return str(self).
get_bbox
(self)[source]¶
Return the Bbox
.
get_boxstyle
(self)[source]¶
Return the boxstyle object.
get_height
(self)[source]¶
Return the height of the rectangle.
get_mutation_aspect
(self)[source]¶
Return the aspect ratio of the bbox mutation.
get_mutation_scale
(self)[source]¶
Return the mutation scale.
get_path
(self)[source]¶
Return the mutated path of the rectangle.
get_width
(self)[source]¶
Return the width of the rectangle.
get_x
(self)[source]¶
Return the left coord of the rectangle.
get_y
(self)[source]¶
Return the bottom coord of the rectangle.
set_bounds
(self, *args)[source]¶
Set the bounds of the rectangle.
Call signatures:
set_bounds(left, bottom, width, height) set_bounds((left, bottom, width, height))Parameters:
The coordinates of the bottom left corner of the rectangle.
The width/height of the rectangle.
set_boxstyle
(self, boxstyle=None, **kwargs)[source]¶
Set the box style.
Most box styles can be further configured using attributes. Attributes from the previous box style are not reused.
Without argument (or with boxstyle=None
), the available box styles are returned as a human-readable string.
Class Name Attrs CircleThe name of the box style. Optionally, followed by a comma and a comma-separated list of attributes. The attributes may alternatively be passed separately as keyword arguments.
The following box styles are available:
circle
pad=0.3 DArrow darrow
pad=0.3 LArrow larrow
pad=0.3 RArrow rarrow
pad=0.3 Round round
pad=0.3, rounding_size=None Round4 round4
pad=0.3, rounding_size=None Roundtooth roundtooth
pad=0.3, tooth_size=None Sawtooth sawtooth
pad=0.3, tooth_size=None Square square
pad=0.3
Additional attributes for the box style. See the table above for supported parameters.
Examples
set_boxstyle("round,pad=0.2") set_boxstyle("round", pad=0.2)
set_height
(self, h)[source]¶
Set the rectangle height.
set_mutation_aspect
(self, aspect)[source]¶
Set the aspect ratio of the bbox mutation.
set_mutation_scale
(self, scale)[source]¶
Set the mutation scale.
set_width
(self, w)[source]¶
Set the rectangle width.
set_x
(self, x)[source]¶
Set the left coord of the rectangle.
set_y
(self, y)[source]¶
Set the bottom coord of the rectangle.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4