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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
PRF: minor performance tweaks
  • Loading branch information
tacaswell committed Jul 28, 2015
commit a4557c29bbadb3bdcb893f344c2a279b9be510a8
13 changes: 6 additions & 7 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2813,15 +2813,14 @@ def mouse_move(self, event):
pass
else:
artists = event.inaxes.hitlist(event)
if event.inaxes.patch in artists:
artists.remove(event.inaxes.patch)

if artists:
artists.sort(key=lambda x: x.zorder)
a = artists[-1]
data = a.get_cursor_data(event)
if data is not None:
s += ' [%s]' % a.format_cursor_data(data)
a = max(enumerate(artists), key=lambda x: x[1].zorder)[1]
if a is not event.inaxes.patch:
data = a.get_cursor_data(event)
if data is not None:
s += ' [%s]' % a.format_cursor_data(data)

if len(self.mode):
self.set_message('%s, %s' % (self.mode, s))
else:
Expand Down