mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator
-
class
mpl_toolkits.axes_grid1.inset_locator.
AnchoredSizeLocator
( bbox_to_anchor, x_size, y_size, loc, borderpad=0.5, bbox_transform=None ) [source] -
Bases:
mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase
Parameters: - loc str
-
The box location. Supported values:
- 'upper right'
- 'upper left'
- 'lower left'
- 'lower right'
- 'center left'
- 'center right'
- 'lower center'
- 'upper center'
- 'center'
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 as fraction of the fontsize.
- borderpad float, default: 0.5
-
Padding between the offsetbox frame and the bbox_to_anchor.
-
child
OffsetBox
-
The box that will be anchored.
-
prop
FontProperties
-
This is only used as a reference for paddings. If not given,
rcParams["legend.fontsize"]
(default:'medium'
) is used. - frameon bool
-
Whether to draw a frame around the box.
-
bbox_to_anchor
BboxBase
, 2-tuple, or 4-tuple of floats -
Box that is used to position the legend in conjunction with loc.
-
bbox_transform
None or
matplotlib.transforms.Transform
-
The transform for the bounding box (bbox_to_anchor).
- **kwargs
-
All other parameters are passed on to
OffsetBox
.
Notes
See
Legend
for a detailed description of the anchoring mechanism.-
__init__
( bbox_to_anchor, x_size, y_size, loc, borderpad=0.5, bbox_transform=None ) [source] -
Parameters: - loc str
-
The box location. Supported values:
- 'upper right'
- 'upper left'
- 'lower left'
- 'lower right'
- 'center left'
- 'center right'
- 'lower center'
- 'upper center'
- 'center'
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 as fraction of the fontsize.
- borderpad float, default: 0.5
-
Padding between the offsetbox frame and the bbox_to_anchor.
-
child
OffsetBox
-
The box that will be anchored.
-
prop
FontProperties
-
This is only used as a reference for paddings. If not given,
rcParams["legend.fontsize"]
(default:'medium'
) is used. - frameon bool
-
Whether to draw a frame around the box.
-
bbox_to_anchor
BboxBase
, 2-tuple, or 4-tuple of floats -
Box that is used to position the legend in conjunction with loc.
-
bbox_transform
None or
matplotlib.transforms.Transform
-
The transform for the bounding box (bbox_to_anchor).
- **kwargs
-
All other parameters are passed on to
OffsetBox
.
Notes
See
Legend
for a detailed description of the anchoring mechanism.
-
__module__
= 'mpl_toolkits.axes_grid1.inset_locator'
-
get_extent
( renderer ) [source] -
Return the extent of the box as (width, height, x, y).
This is the extent of the child plus the padding.
Examples using mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.3/api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator.html