()
| 57 | @image_comparison(['streamplot_masks_and_nans.png'], |
| 58 | remove_text=True, style='mpl20') |
| 59 | def test_masks_and_nans(): |
| 60 | X, Y, U, V = velocity_field() |
| 61 | mask = np.zeros(U.shape, dtype=bool) |
| 62 | mask[40:60, 80:120] = 1 |
| 63 | U[:20, :40] = np.nan |
| 64 | U = np.ma.array(U, mask=mask) |
| 65 | ax = plt.figure().subplots() |
| 66 | with np.errstate(invalid='ignore'): |
| 67 | ax.streamplot(X, Y, U, V, color=U, cmap="Blues") |
| 68 | |
| 69 | |
| 70 | @image_comparison(['streamplot_maxlength.png'], |
nothing calls this directly
no test coverage detected
searching dependent graphs…