()
| 1053 | |
| 1054 | |
| 1055 | def test_hexbin_pickable(): |
| 1056 | # From #1973: Test that picking a hexbin collection works |
| 1057 | fig, ax = plt.subplots() |
| 1058 | data = (np.arange(200) / 200).reshape((2, 100)) |
| 1059 | x, y = data |
| 1060 | hb = ax.hexbin(x, y, extent=[.1, .3, .6, .7], picker=-1) |
| 1061 | mouse_event = SimpleNamespace(x=400, y=300) |
| 1062 | assert hb.contains(mouse_event)[0] |
| 1063 | |
| 1064 | |
| 1065 | @image_comparison(['hexbin_log.png'], style='mpl20') |