From f47cd2a4d07034d5a395cbfa35d8711d4baae4fb Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 30 Apr 2019 12:12:54 +0200 Subject: [PATCH] Backport PR #14100: Improve docstring of axes_zoom_effect example. --- .../axes_zoom_effect.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/examples/subplots_axes_and_figures/axes_zoom_effect.py b/examples/subplots_axes_and_figures/axes_zoom_effect.py index e17cb9355c9f..3f156eba35a4 100644 --- a/examples/subplots_axes_and_figures/axes_zoom_effect.py +++ b/examples/subplots_axes_and_figures/axes_zoom_effect.py @@ -4,9 +4,9 @@ ================ """ + from matplotlib.transforms import ( Bbox, TransformedBbox, blended_transform_factory) - from mpl_toolkits.axes_grid1.inset_locator import ( BboxPatch, BboxConnector, BboxConnectorPatch) @@ -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)