Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57e0f0a

Browse files
committed
fix detection of which artist(s) the mouse is over
since Artist.contains() returns a tuple it is not usable like "if my_artist.contains(): do something"
1 parent 869c984 commit 57e0f0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2890,7 +2890,7 @@ def mouse_move(self, event):
28902890
pass
28912891
else:
28922892
artists = [a for a in event.inaxes.mouseover_set
2893-
if a.contains(event) and a.get_visible()]
2893+
if a.contains(event)[0] and a.get_visible()]
28942894

28952895
if artists:
28962896
a = cbook._topmost_artist(artists)

0 commit comments

Comments
 (0)