MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_hexbin_pickable

Function test_hexbin_pickable

lib/matplotlib/tests/test_axes.py:1055–1062  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1053
1054
1055def 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')

Callers

nothing calls this directly

Calls 3

hexbinMethod · 0.80
subplotsMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…