8000 Add inaxes method to FigureCanvas to check whether point is in an axes. by lkjell · Pull Request #9845 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add inaxes method to FigureCanvas to check whether point is in an axes. #9845

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 6 commits into from
Feb 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use cbook._topmost_artist in Figure.inaxes.
  • Loading branch information
lkjell committed Mar 6, 2018
commit 1628e7cea32bca1446b7b2e49e7fba9ac714d907
2 changes: 1 addition & 1 deletion lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ def inaxes(self, xy):
axes_list = [a for a in self.get_axes() if a.patch.contains_point(xy)]

if axes_list:
axes = max(reversed(axes_list), key=lambda x: x.zorder)
axes = cbook._topmost_artist(axes_list)
else:
axes = None

Expand Down
0