matplotlib.axes.Axes.indicate_inset#
- Axes.indicate_inset(bounds=None,inset_ax=None,*,transform=None,facecolor='none',edgecolor='0.5',alpha=0.5,zorder=None,**kwargs)[source]#
Add an inset indicator to the Axes. This is a rectangle on the plotat the position indicated bybounds that optionally has lines thatconnect the rectangle to an inset Axes (
Axes.inset_axes).- Parameters:
- bounds[x0, y0, width, height], optional
Lower-left corner of rectangle to be marked, and its widthand height. If not set, the bounds will be calculated from thedata limits ofinset_ax, which must be supplied.
- inset_ax
Axes, optional An optional inset Axes to draw connecting lines to. Two lines aredrawn connecting the indicator box to the inset Axes on cornerschosen so as to not overlap with the indicator box.
- transform
Transform Transform for the rectangle coordinates. Defaults to
ax.transData, i.e. the units ofrect are in the Axes' datacoordinates.- facecolorcolor, default: 'none'
Facecolor of the rectangle.
- edgecolorcolor, default: '0.5'
Color of the rectangle and color of the connecting lines.
- alphafloat or None, default: 0.5
Transparency of the rectangle and connector lines. If not
None, this overrides any alpha value included in thefacecolor andedgecolor parameters.- zorderfloat, default: 4.99
Drawing order of the rectangle and connector lines. The default,4.99, is just below the default level of inset Axes.
- **kwargs
Other keyword arguments are passed on to the
Rectanglepatch: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
float or None
unknown
bool
bool or None
(left, bottom, width, height)
CapStyleor {'butt', 'projecting', 'round'}BboxBaseor Nonebool
Patch or (Path, Transform) or None
color or None
color or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
unknown
color or 'edge' or None
unknown
bool
JoinStyleor {'miter', 'round', 'bevel'}object
{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
float or None
bool
list of
AbstractPathEffectNone or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
unknown
unknown
(float, float)
unknown
float
- Returns:
- inset_indicator
inset.InsetIndicator An artist which contains
- inset_indicator.rectangle
Rectangle The indicator frame.
- inset_indicator.connectors4-tuple of
patches.ConnectionPatch The four connector lines connecting to (lower_left, upper_left,lower_right upper_right) corners ofinset_ax. Two lines areset with visibility toFalse, but the user can set thevisibility to True if the automatic choice is not deemed correct.
Changed in version 3.10:Previously the rectangle and connectors tuple were returned.
- inset_indicator.rectangle
- inset_indicator
Warning
This method is experimental as of 3.0, and the API may change.