From 64f425d843b5281c26bee55e64c9a077cd0fe26e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 21 Jan 2023 04:50:06 -0500 Subject: [PATCH] Include child Axes inaxes calculation This makes InsetAxes count for this field, and allows widgets to work in them. Fixes #25030 --- lib/matplotlib/backend_bases.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 8c11c73afb8c..800ad1b98a18 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -2007,6 +2007,12 @@ def inaxes(self, xy): if a.patch.contains_point(xy) and a.get_visible()] if axes_list: axes = cbook._topmost_artist(axes_list) + prev_axes = None + while prev_axes != axes: + prev_axes = axes + axes_list = [a for a in axes.child_axes + if a.patch.contains_point(xy) and a.get_visible()] + axes = cbook._topmost_artist([axes, *axes_list]) else: axes = None 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