MATLAB: Whiteout regions on Contour Plot

contour

Best Answer

My recommendation would be to set the interpolated data to nan in those regions before doing the contour plot.
However, since you have scattered data, you have the challenge of determining which points are "near enough" to explicit scattered data that they should validly be interpolated, and which points are instead to be interpreted as being too far from the scattered data and so should be interpreted as being outside the map.
You could consider a pdist2() approach but it appears you have a fair bit of data, so that would not be computationally feasible. You might be able to take advantage of kd-tree approaches; https://www.mathworks.com/help/stats/classification-using-nearest-neighbors.html