From 1fcae9824e90aae886f1fdcd376630cf9bc0a5dd Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 5 Dec 2021 21:07:08 +0100 Subject: [PATCH] Backport PR #21866: Shorten some inset_locator docstrings. --- .../axes_zoom_effect.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/examples/subplots_axes_and_figures/axes_zoom_effect.py b/examples/subplots_axes_and_figures/axes_zoom_effect.py index 7b4aa4689df9..f8331d552aed 100644 --- a/examples/subplots_axes_and_figures/axes_zoom_effect.py +++ b/examples/subplots_axes_and_figures/axes_zoom_effect.py @@ -109,17 +109,14 @@ def zoom_effect02(ax1, ax2, **kwargs): return c1, c2, bbox_patch1, bbox_patch2, p -plt.figure(figsize=(5, 5)) -ax1 = plt.subplot(221) -ax2 = plt.subplot(212) -ax2.set_xlim(0, 1) -ax2.set_xlim(0, 5) -zoom_effect01(ax1, ax2, 0.2, 0.8) - - -ax1 = plt.subplot(222) -ax1.set_xlim(2, 3) -ax2.set_xlim(0, 5) -zoom_effect02(ax1, ax2) +axs = plt.figure().subplot_mosaic([ + ["zoom1", "zoom2"], + ["main", "main"], +]) + +axs["main"].set(xlim=(0, 5)) +zoom_effect01(axs["zoom1"], axs["main"], 0.2, 0.8) +axs["zoom2"].set(xlim=(2, 3)) +zoom_effect02(axs["zoom2"], axs["main"]) plt.show() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy