You are reading an old version of the documentation (v3.0.2). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.indicate_inset.html
Version 3.0.2
matplotlib
Fork me on GitHub

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 co-ordinates. Defaults to ax.transAxes, i.e. the units of rect are in axes-relative coordinates.

facecolor : Matplotlib color

Facecolor of the rectangle (default 'none').

edgecolor : Matplotlib color

Color of the rectangle and color of the connecting lines. Default is '0.5'.

alpha : number

Transparency of the rectangle and connector lines. Default is 0.5.

zorder : number

Drawing order of the rectangle and connector lines. Default is 4.99 (just below the default level of inset axes).

**kwargs

Other kwargs are passed on to the rectangle patch.

Returns:
rectangle_patch: `.Patches.Rectangle`

Rectangle artist.

connector_lines: 4-tuple of `.Patches.ConnectionPatch`

One for each of four connector lines. Two are set with visibility to False, but the user can set the visibility to True if the automatic choice is not deemed correct.

Warning

This method is experimental as of 3.0, and the API may change.