| 70 | @image_comparison(['streamplot_maxlength.png'], |
| 71 | remove_text=True, style='mpl20', tol=0.302) |
| 72 | def test_maxlength(): |
| 73 | x, y, U, V = swirl_velocity_field() |
| 74 | ax = plt.figure().subplots() |
| 75 | ax.streamplot(x, y, U, V, maxlength=10., start_points=[[0., 1.5]], |
| 76 | linewidth=2, density=2) |
| 77 | assert ax.get_xlim()[-1] == ax.get_ylim()[-1] == 3 |
| 78 | # Compatibility for old test image |
| 79 | ax.set(xlim=(None, 3.2555988021882305), ylim=(None, 3.078326760195413)) |
| 80 | |
| 81 | |
| 82 | @image_comparison(['streamplot_maxlength_no_broken.png'], |