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

Function test_contains_points

lib/matplotlib/tests/test_patches.py:669–677  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

667
668
669def test_contains_points():
670 ell = mpatches.Ellipse((0.5, 0.5), 0.5, 1.0)
671 points = [(0.0, 0.5), (0.2, 0.5), (0.25, 0.5), (0.5, 0.5)]
672 path = ell.get_path()
673 transform = ell.get_transform()
674 radius = ell._process_radius(None)
675 expected = path.contains_points(points, transform, radius)
676 result = ell.contains_points(points)
677 assert np.all(result == expected)
678
679
680# Currently fails with pdf/svg, probably because some parts assume a dpi of 72.

Callers

nothing calls this directly

Calls 4

get_pathMethod · 0.95
_process_radiusMethod · 0.80
get_transformMethod · 0.45
contains_pointsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…