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

Function test_nonlinear_containment

lib/matplotlib/tests/test_path.py:141–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139
140
141def test_nonlinear_containment():
142 fig, ax = plt.subplots()
143 ax.set(xscale="log", ylim=(0, 1))
144 polygon = ax.axvspan(1, 10)
145 assert polygon.get_path().contains_point(
146 ax.transData.transform((5, .5)), polygon.get_transform())
147 assert not polygon.get_path().contains_point(
148 ax.transData.transform((.5, .5)), polygon.get_transform())
149 assert not polygon.get_path().contains_point(
150 ax.transData.transform((50, .5)), polygon.get_transform())
151
152
153@image_comparison(['arrow_contains_point.png'], remove_text=True, style='mpl20',

Callers

nothing calls this directly

Calls 7

axvspanMethod · 0.80
subplotsMethod · 0.45
setMethod · 0.45
contains_pointMethod · 0.45
get_pathMethod · 0.45
transformMethod · 0.45
get_transformMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…