8000 Fix test_hexbin_pickable test · matplotlib/matplotlib@139a0e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 139a0e4

Browse files
committed
Fix test_hexbin_pickable test
1 parent 37a470a commit 139a0e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def __init__(self, x, y):
472472
data = np.arange(200.)/200.
473473
data.shape = 2, 100
474474
x, y = data
475-
hb = ax.hexbin(x, y, extent=[.1, .3, .6, .7], picker=1)
475+
hb = ax.hexbin(x, y, extent=[.1, .3, .6, .7], picker=-1)
476476

477477
assert hb.contains(FauxMouseEvent(400, 300))[0]
478478

src/_path.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@ void point_in_path_collection(double x,
442442
result.push_back(i);
443443
}
444444
} else {
445-
if (point_on_path(x, y, radius, path, trans))
445+
if (point_on_path(x, y, radius, path, trans)) {
446446
result.push_back(i);
447+
}
447448
}
448449
}
449450
}

0 commit comments

Comments
 (0)
0