()
| 408 | |
| 409 | @image_comparison(['fft_peaks'], remove_text=True, style='_classic_test') |
| 410 | def 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 | |
| 425 | def test_start_with_moveto(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…