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

Function test_masks_and_nans

lib/matplotlib/tests/test_streamplot.py:59–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57@image_comparison(['streamplot_masks_and_nans.png'],
58 remove_text=True, style='mpl20')
59def 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'],

Callers

nothing calls this directly

Calls 3

velocity_fieldFunction · 0.85
figureMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…