mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox
- class mpl_toolkits.axes_grid1.anchored_artists. AnchoredAuxTransformBox ( transform, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True, **kwargs ) [source]
-
Bases:
matplotlib.offsetbox.AnchoredOffsetbox
An anchored container with transformed coordinates.
Artists added to the drawing_area are scaled according to the coordinates of the transformation used. The dimensions of this artist will scale to contain the artists added.
- Parameters
-
-
transform
matplotlib.transforms.Transform
-
The transformation object for the coordinate system in use, i.e.,
matplotlib.axes.Axes.transData
. - loc str
-
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. - pad float, default: 0.4
-
Padding around the child objects, in fraction of the font size.
- borderpad float, default: 0.5
-
Border padding, in fraction of the font size.
-
prop
matplotlib.font_manager.FontProperties
, optional -
Font property used as a reference for paddings.
- frameon bool, default: True
-
If True, draw a box around this artists.
- **kwargs
-
Keyword arguments forwarded to
AnchoredOffsetbox
.
-
transform
Examples
To display an ellipse in the upper left, with a width of 0.1 and height of 0.4 in data coordinates:
>>> box = AnchoredAuxTransformBox(ax.transData, loc='upper left') >>> el = Ellipse((0, 0), width=0.1, height=0.4, angle=30) >>> box.drawing_area.add_artist(el) >>> ax.add_artist(box)
- Attributes
-
-
drawing_area
matplotlib.offsetbox.AuxTransformBox
-
A container for artists to display.
-
drawing_area
- set ( *, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET> ) [source]
-
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
scalar or None
bool
unknown
unknown
bool
Patch or (Path, Transform) or None
str
float
bool
object
(float, float) or callable
None or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
float
float
Examples using mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox.html