class matplotlib.patches.FancyBboxPatch(xy, width, height, boxstyle='round', bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)
[source]
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 BoxTransmuterBase
and its derived classes.
Parameters: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Other Parameters: |
|
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: |
|
---|
set_boxstyle(self, boxstyle=None, **kw)
[source]
Set the box style.
boxstyle can be a string with boxstyle name with optional comma-separated attributes. Alternatively, the attrs can be provided as keywords:
set_boxstyle("round,pad=0.2") set_boxstyle("round", pad=0.2)
Old attrs simply are forgotten.
Without argument (or with boxstyle = None), it returns available box styles.
The following boxstyles are available:
Class | Name | Attrs |
---|---|---|
Circle | 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 |
ACCEPTS: [ 'circle' | 'darrow' | 'larrow' | 'rarrow' | 'round' | 'round4' | 'roundtooth' | 'sawtooth' | 'square' ]
set_height(self, h)
[source]
Set the rectangle height.
Parameters: |
|
---|
set_mutation_aspect(self, aspect)
[source]
Set the aspect ratio of the bbox mutation.
Parameters: |
|
---|
set_mutation_scale(self, scale)
[source]
Set the mutation scale.
Parameters: |
|
---|
set_width(self, w)
[source]
Set the rectangle width.
Parameters: |
|
---|
set_x(self, x)
[source]
Set the left coord of the rectangle.
Parameters: |
|
---|
set_y(self, y)
[source]
Set the bottom coord of the rectangle.
Parameters: |
|
---|
matplotlib.patches.FancyBboxPatch
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.FancyBboxPatch.html