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`). Warnings -------- This method is experimental as of
(self, bounds=None, inset_ax=None, *, transform=None,
facecolor='none', edgecolor='0.5', alpha=0.5,
zorder=None, **kwargs)
| 430 | |
| 431 | @_docstring.interpd |
| 432 | def indicate_inset(self, bounds=None, inset_ax=None, *, transform=None, |
| 433 | facecolor='none', edgecolor='0.5', alpha=0.5, |
| 434 | zorder=None, **kwargs): |
| 435 | """ |
| 436 | Add an inset indicator to the Axes. This is a rectangle on the plot |
| 437 | at the position indicated by *bounds* that optionally has lines that |
| 438 | connect the rectangle to an inset Axes (`.Axes.inset_axes`). |
| 439 | |
| 440 | Warnings |
| 441 | -------- |
| 442 | This method is experimental as of 3.0, and the API may change. |
| 443 | |
| 444 | Parameters |
| 445 | ---------- |
| 446 | bounds : [x0, y0, width, height], optional |
| 447 | Lower-left corner of rectangle to be marked, and its width |
| 448 | and height. If not set, the bounds will be calculated from the |
| 449 | data limits of *inset_ax*, which must be supplied. |
| 450 | |
| 451 | inset_ax : `.Axes`, optional |
| 452 | An optional inset Axes to draw connecting lines to. Two lines are |
| 453 | drawn connecting the indicator box to the inset Axes on corners |
| 454 | chosen so as to not overlap with the indicator box. |
| 455 | |
| 456 | transform : `.Transform` |
| 457 | Transform for the rectangle coordinates. Defaults to |
| 458 | ``ax.transData``, i.e. the units of *rect* are in the Axes' data |
| 459 | coordinates. |
| 460 | |
| 461 | facecolor : :mpltype:`color`, default: 'none' |
| 462 | Facecolor of the rectangle. |
| 463 | |
| 464 | edgecolor : :mpltype:`color`, default: '0.5' |
| 465 | Color of the rectangle and color of the connecting lines. |
| 466 | |
| 467 | alpha : float or None, default: 0.5 |
| 468 | Transparency of the rectangle and connector lines. If not |
| 469 | ``None``, this overrides any alpha value included in the |
| 470 | *facecolor* and *edgecolor* parameters. |
| 471 | |
| 472 | zorder : float, default: 4.99 |
| 473 | Drawing order of the rectangle and connector lines. The default, |
| 474 | 4.99, is just below the default level of inset Axes. |
| 475 | |
| 476 | **kwargs |
| 477 | Other keyword arguments are passed on to the `.Rectangle` patch: |
| 478 | |
| 479 | %(Rectangle:kwdoc)s |
| 480 | |
| 481 | Returns |
| 482 | ------- |
| 483 | inset_indicator : `.inset.InsetIndicator` |
| 484 | An artist which contains |
| 485 | |
| 486 | inset_indicator.rectangle : `.Rectangle` |
| 487 | The indicator frame. |
| 488 | |
| 489 | inset_indicator.connectors : 4-tuple of `.patches.ConnectionPatch` |