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

Function test_noise

lib/matplotlib/tests/test_simplification.py:76–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74
75
76def test_noise():
77 np.random.seed(0)
78 x = np.random.uniform(size=50000) * 50
79
80 fig, ax = plt.subplots()
81 p1 = ax.plot(x, solid_joinstyle='round', linewidth=2.0)
82
83 # Ensure that the path's transform takes the new axes limits into account.
84 fig.canvas.draw()
85 path = p1[0].get_path()
86 transform = p1[0].get_transform()
87 path = transform.transform_path(path)
88 simplified = path.cleaned(simplify=True)
89
90 assert simplified.vertices.size == 25512
91
92
93def test_antiparallel_simplification():

Callers

nothing calls this directly

Calls 7

cleanedMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
drawMethod · 0.45
get_pathMethod · 0.45
get_transformMethod · 0.45
transform_pathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…