Skip to content

Commit

Permalink
Merge pull request #4813 from tacaswell/prf_mouse_move_hitlist
Browse files Browse the repository at this point in the history
Prf mouse move hitlist
  • Loading branch information
jenshnielsen committed Jul 30, 2015
2 parents 9424a09 + a4557c2 commit 8b6ee19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
13 changes: 6 additions & 7 deletions lib/matplotlib/backend_bases.py
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
5 changes: 3 additions & 2 deletions lib/matplotlib/transforms.py
Expand Up @@ -50,7 +50,8 @@
from .path import Path

DEBUG = False

# we need this later, but this is very expensive to set up
MINFLOAT = np.MachAr(float).xmin
MaskedArray = ma.MaskedArray


Expand Down Expand Up @@ -2738,7 +2739,7 @@ def nonsingular(vmin, vmax, expander=0.001, tiny=1e-15, increasing=True):
swapped = True

maxabsvalue = max(abs(vmin), abs(vmax))
if maxabsvalue < (1e6 / tiny) * np.MachAr(float).xmin:
if maxabsvalue < (1e6 / tiny) * MINFLOAT:
vmin = -expander
vmax = expander

Expand Down

0 comments on commit 8b6ee19

Please sign in to comment.