Bases: AnchoredOffsetbox
An anchored container with a fixed size and fillable DrawingArea.
Artists added to the drawing_area will have their coordinates interpreted as pixels. Any transformations set on the artists will be overridden.
Width and height of the container, in pixels.
Descent of the container in the x- and y- direction, in pixels.
Location of this artist. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
Padding around the child objects, in fraction of the font size.
Border padding, in fraction of the font size.
FontProperties, optional
Font property used as a reference for paddings.
If True, draw a box around this artist.
Keyword arguments forwarded to AnchoredOffsetbox.
DrawingArea
A container for artists to display.
To display blue and red circles of different sizes in the upper right of an Axes ax:
>>> ada = AnchoredDrawingArea(20, 20, 0, 0, ... loc='upper right', frameon=False) >>> ada.drawing_area.add_artist(Circle((10, 10), 10, fc="b")) >>> ada.drawing_area.add_artist(Circle((30, 10), 5, fc="r")) >>> ax.add_artist(ada)
Set multiple properties at once.
Supported properties are
Property | Description |
|---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image | |
scalar or None | |
bool | |
unknown | |
unknown | |
| |
bool | |
Patch or (Path, Transform) or None | |
str | |
float | |
bool | |
object | |
bool | |
(float, float) or callable | |
list of | |
None or bool or float or callable | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
bool | |
float | |
float |
mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea
© 2012–2023 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea.html