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

Function test_picking

lib/matplotlib/tests/test_collections.py:563–570  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561
562
563def test_picking():
564 fig, ax = plt.subplots()
565 col = ax.scatter([0], [0], [1000], picker=True)
566 fig.savefig(io.BytesIO(), dpi=fig.dpi)
567 mouse_event = SimpleNamespace(x=325, y=240)
568 found, indices = col.contains(mouse_event)
569 assert found
570 assert_array_equal(indices['ind'], [0])
571
572
573def test_quadmesh_contains():

Callers

nothing calls this directly

Calls 4

subplotsMethod · 0.45
scatterMethod · 0.45
savefigMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…