The image shows some precipitation distribution file after interpolation. But some of the points are going outside the map. I need to remove those points or fix it as Nan. But I have no idea how to identify specific lat-lon which are outside the CONUS map and fix it as Nan. so that pcolorm don't colour that part. The simple code, which I used is below here:
[LatGrid, LonGrid] = meshgrid(linspace(min(CONUS_LAT), max(CONUS_LAT)), ... linspace(min(CONUS_LON), max(CONUS_LON)));
CONUS_grid = griddata(CONUS_LAT, CONUS_LON, X_precip, LatGrid, LonGrid);
pcolorm(LatGrid, LonGrid, CONUS_grid);
I hope the code is okay but please let me know how to remove the points that are lying outside the map through code. Thanks in advance.