matplotlib.axes.Axes.indicate_inset#
- Axes.indicate_inset(bounds, inset_ax=None, *, transform=None, facecolor='none', edgecolor='0.5', alpha=0.5, zorder=4.99, **kwargs)[source]#
Add an inset indicator to the Axes. This is a rectangle on the plot at the position indicated by bounds that optionally has lines that connect the rectangle to an inset Axes (
Axes.inset_axes
).- Parameters:
- bounds[x0, y0, width, height]
Lower-left corner of rectangle to be marked, and its width and height.
- inset_ax
Axes
An optional inset Axes to draw connecting lines to. Two lines are drawn connecting the indicator box to the inset Axes on corners chosen so as to not overlap with the indicator box.
- transform
Transform
Transform for the rectangle coordinates. Defaults to
ax.transAxes
, i.e. the units of rect are in Axes-relative coordinates.- facecolorcolor, default: 'none'
Facecolor of the rectangle.
- edgecolorcolor, default: '0.5'
Color of the rectangle and color of the connecting lines.
- alphafloat, default: 0.5
Transparency of the rectangle and connector lines.
- 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
Rectangle
patch: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
unknown
bool
antialiased
or aabool or None
(left, bottom, width, height)
CapStyle
or {'butt', 'projecting', 'round'}bool
Patch or (Path, Transform) or None
color
edgecolor
or eccolor or None
facecolor
or fccolor or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
unknown
bool
JoinStyle
or {'miter', 'round', 'bevel'}object
linestyle
or ls{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
or lwfloat or None
bool
None 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:
- rectangle_patch
patches.Rectangle
The indicator frame.
- connector_lines4-tuple of
patches.ConnectionPatch
The four connector lines connecting to (lower_left, upper_left, lower_right upper_right) corners of inset_ax. Two lines are set with visibility to False, but the user can set the visibility to True if the automatic choice is not deemed correct.
- rectangle_patch
Warning
This method is experimental as of 3.0, and the API may change.