y = np.random.rand(1000)
sst = sst_data(x, y)
grid_x, grid_y = np.mgrid[0:1:100j, 0:1:200j]
grid_z = griddata((x, y), sst, (grid_x, grid_y), method='cubic')
nr, nc = grid_z.shape
grid_z[-nr // 3:, -nc // 3:] = np.nan
plt.contourf(grid_x, grid_y, grid_z)
plt.show()
Contour irregular data within polygon