Bases: 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.
BoxStyle
The style of the fancy box. This can either be a BoxStyle
instance or a string of the style name and optionally comma separated attributes (e.g. "Round, pad=0.2"). This string is passed to BoxStyle
to construct a BoxStyle
object. See there for a full documentation.
The following box styles are available:
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
Return the Bbox
.
Return the boxstyle object.
Return the height of the rectangle.
Return the aspect ratio of the bbox mutation.
Return the mutation scale.
Return the mutated path of the rectangle.
Return the width of the rectangle.
Return the left coord of the rectangle.
Return the bottom coord of the rectangle.
Set multiple properties at once.
Supported properties are
Set the bounds of the rectangle.
Call signatures:
set_bounds(left, bottom, width, height) set_bounds((left, bottom, width, height))
The coordinates of the bottom left corner of the rectangle.
The width/height of the rectangle.
Set the box style, possibly with further 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.
BoxStyle
The style of the box: either a BoxStyle
instance, or a string, which is the style name and optionally comma separated attributes (e.g. "Round,pad=0.2"). Such a string is used to construct a BoxStyle
object, as documented in that class.
The following box styles are available:
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 the rectangle height.
Set the aspect ratio of the bbox mutation.
Set the mutation scale.
Set the rectangle width.
Set the left coord of the rectangle.
Set the bottom coord of the rectangle.
matplotlib.patches.FancyBboxPatch
#
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