Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b6ee19

Browse filesBrowse files
committed
Merge pull request #4813 from tacaswell/prf_mouse_move_hitlist
Prf mouse move hitlist
2 parents 9424a09 + a4557c2 commit 8b6ee19
Copy full SHA for 8b6ee19

File tree

Expand file treeCollapse file tree

2 files changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-9
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+6-7Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,15 +2813,14 @@ def mouse_move(self, event):
28132813
pass
28142814
else:
28152815
artists = event.inaxes.hitlist(event)
2816-
if event.inaxes.patch in artists:
2817-
artists.remove(event.inaxes.patch)
28182816

28192817
if artists:
2820-
artists.sort(key=lambda x: x.zorder)
2821-
a = artists[-1]
2822-
data = a.get_cursor_data(event)
2823-
if data is not None:
2824-
s += ' [%s]' % a.format_cursor_data(data)
2818+
a = max(enumerate(artists), key=lambda x: x[1].zorder)[1]
2819+
if a is not event.inaxes.patch:
2820+
data = a.get_cursor_data(event)
2821+
if data is not None:
2822+
s += ' [%s]' % a.format_cursor_data(data)
2823+
28252824
if len(self.mode):
28262825
self.set_message('%s, %s' % (self.mode, s))
28272826
else:

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
from .path import Path
5151

5252
DEBUG = False
53-
53+
# we need this later, but this is very expensive to set up
54+
MINFLOAT = np.MachAr(float).xmin
5455
MaskedArray = ma.MaskedArray
5556

5657

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

27402741
maxabsvalue = max(abs(vmin), abs(vmax))
2741-
if maxabsvalue < (1e6 / tiny) * np.MachAr(float).xmin:
2742+
if maxabsvalue < (1e6 / tiny) * MINFLOAT:
27422743
vmin = -expander
27432744
vmax = expander
27442745

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.