I'm trying to contour plot some data with NaNs (no solution). I want to indicate the border of the NaNs with a black line. So far I've only found how to hatch the whole NaN region (hatch a NaN region in a contourplot in matplotlib) but I just want the outline.
fig, ax = plt.subplots()
d = np.random.rand(10, 10)
d[2, 2], d[3, 5] = np.nan, np.nan
plt.contour(d)
plt.show()
I get:
I would want: