8000 Improve docstring of axes_zoom_effect example. by anntzer · Pull Request #14100 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Improve docstring of axes_zoom_effect example. #14100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions examples/subplots_axes_and_figures/axes_zoom_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
================

"""

from matplotlib.transforms import (
Bbox, TransformedBbox, blended_transform_factory)

from mpl_toolkits.axes_grid1.inset_locator import (
BboxPatch, BboxConnector, BboxConnectorPatch)

Expand Down Expand Up @@ -39,14 +39,19 @@ def connect_bbox(bbox1, bbox2,

def zoom_effect01(ax1, ax2, xmin, xmax, **kwargs):
"""
ax1 : the main axes
ax1 : the zoomed axes
(xmin,xmax) : the limits of the colored area in both plot axes.

connect ax1 & ax2. The x-range of (xmin, xmax) in both axes will
be marked. The keywords parameters will be used ti create
patches.

Connect *ax1* and *ax2*. The *xmin*-to-*xmax* range in both axes will
be marked.

Parameters
----------
ax1
The main axes.
ax2
The zoomed axes.
xmin, xmax
The limits of the colored area in both plot axes.
**kwargs
Arguments passed to the patch constructor.
"""

trans1 = blended_transform_factory(ax1.transData, ax1.transAxes)
Expand Down
0