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 c
| 4032 | |
| 4033 | |
| 4034 | class FancyBboxPatch(Patch): |
| 4035 | """ |
| 4036 | A fancy box around a rectangle with lower left at *xy* = (*x*, *y*) |
| 4037 | with specified width and height. |
| 4038 | |
| 4039 | `.FancyBboxPatch` is similar to `.Rectangle`, but it draws a fancy box |
| 4040 | around the rectangle. The transformation of the rectangle box to the |
| 4041 | fancy box is delegated to the style classes defined in `.BoxStyle`. |
| 4042 | """ |
| 4043 | |
| 4044 | _edge_default = True |
| 4045 | |
| 4046 | def __str__(self): |
| 4047 | s = self.__class__.__name__ + "((%g, %g), width=%g, height=%g)" |
| 4048 | return s % (self._x, self._y, self._width, self._height) |
| 4049 | |
| 4050 | @_docstring.interpd |
| 4051 | def __init__(self, xy, width, height, boxstyle="round", *, |
| 4052 | mutation_scale=1, mutation_aspect=1, **kwargs): |
| 4053 | """ |
| 4054 | Parameters |
| 4055 | ---------- |
| 4056 | xy : (float, float) |
| 4057 | The lower left corner of the box. |
| 4058 | |
| 4059 | width : float |
| 4060 | The width of the box. |
| 4061 | |
| 4062 | height : float |
| 4063 | The height of the box. |
| 4064 | |
| 4065 | boxstyle : str or `~matplotlib.patches.BoxStyle` |
| 4066 | The style of the fancy box. This can either be a `.BoxStyle` |
| 4067 | instance or a string of the style name and optionally comma |
| 4068 | separated attributes (e.g. "Round, pad=0.2"). This string is |
| 4069 | passed to `.BoxStyle` to construct a `.BoxStyle` object. See |
| 4070 | there for a full documentation. |
| 4071 | |
| 4072 | The following box styles are available: |
| 4073 | |
| 4074 | %(BoxStyle:table)s |
| 4075 | |
| 4076 | mutation_scale : float, default: 1 |
| 4077 | Scaling factor applied to the attributes of the box style |
| 4078 | (e.g. pad or rounding_size). |
| 4079 | |
| 4080 | mutation_aspect : float, default: 1 |
| 4081 | The height of the rectangle will be squeezed by this value before |
| 4082 | the mutation and the mutated box will be stretched by the inverse |
| 4083 | of it. For example, this allows different horizontal and vertical |
| 4084 | padding. |
| 4085 | |
| 4086 | Other Parameters |
| 4087 | ---------------- |
| 4088 | **kwargs : `~matplotlib.patches.Patch` properties |
| 4089 | |
| 4090 | %(Patch:kwdoc)s |
| 4091 | """ |