File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 38
38
import warnings
39
39
import time
40
40
import io
41
- from operator import itemgetter
42
41
43
42
import numpy as np
44
43
import matplotlib .cbook as cbook
@@ -1697,7 +1696,7 @@ def onRemove(self, ev):
1697
1696
"""
1698
1697
# Find the top artist under the cursor
1699
1698
under = self .figure .hitlist (ev )
1700
- under .sort (key = itemgetter ( 0 ) )
1699
+ under .sort (key = key = lambda x : x . zorder )
1701
1700
h = None
1702
1701
if under :
1703
1702
h = under [- 1 ]
@@ -2796,7 +2795,7 @@ def mouse_move(self, event):
2796
2795
pass
2797
2796
else :
2798
2797
artists = self .figure .hitlist (event )
2799
- artists .sort (key = itemgetter ( 0 ) )
2798
+ artists .sort (key = lambda x : x . zorder )
47BA
2800
2799
if artists :
2801
2800
s += artists [- 1 ].get_zdata (event )
2802
2801
if len (self .mode ):
You can’t perform that action at this time.
0 commit comments