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

Function test_fft_peaks

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

Source from the content-addressed store, hash-verified

408
409@image_comparison(['fft_peaks'], remove_text=True, style='_classic_test')
410def test_fft_peaks():
411 fig, ax = plt.subplots()
412 t = np.arange(65536)
413 p1 = ax.plot(abs(np.fft.fft(np.sin(2*np.pi*.01*t)*np.blackman(len(t)))))
414
415 # Ensure that the path's transform takes the new axes limits into account.
416 fig.canvas.draw()
417 path = p1[0].get_path()
418 transform = p1[0].get_transform()
419 path = transform.transform_path(path)
420 simplified = path.cleaned(simplify=True)
421
422 assert simplified.vertices.size == 36
423
424
425def test_start_with_moveto():

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…