8000 Use cbook._topmost_artist in Figure.inaxes. · matplotlib/matplotlib@1628e7c · GitHub
[go: up one dir, main page]

Skip to content

Commit 1628e7c

Browse files
committed
Use cbook._topmost_artist in Figure.inaxes.
1 parent 0d4f245 commit 1628e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ def inaxes(self, xy):
15511551
axes_list = [a for a in self.get_axes() if a.patch.contains_point(xy)]
15521552

15531553
if axes_list:
1554-
axes = max(reversed(axes_list), key=lambda x: x.zorder)
1554+
axes = cbook._topmost_artist(axes_list)
15551555
else:
15561556
axes = None
15571557

0 commit comments

Comments
 (0)
0