White space in map grid.
显示 更早的评论
Hello, I'm making a map with surfm but is getting blanks within map grid. I tried to lower the grade, but white space does not come out.

Thank you for your help.
采纳的回答
更多回答(1 个)
Chad Greene
2016-3-28
The surfm function discards a row and column of data on the edges. Here's a brute-force solution:
% Repeat columns on each side of data:
lat = [lat(:,1) lat lat(:,end)];
lon = [lon(:,1) lon lon(:,end)];
z = [z(:,1) z z(:,end)];
% Repeat rows on top and bottom:
lat = [lat(1,:);lat;lat(end,1)];
lon = [lon(1,:);lon;lon(end,1)];
z = [z(1,:);z;z(end,1)];
surfm(lat,lon,z)
3 个评论
IGOR RIBEIRO
2016-3-28
Kelly Kearney
2016-3-28
While it's true that surfm (and all surf, pcolor, etc) all drop the last row and column of data when using flat or faceted shading, I think that's unrelated to the OP's issue. The problem with mapping toolbox functions is that they often clip data that is on the edge of the map, even if it isn't on the edge of the full data grid. See my reply for more details.
Chad Greene
2016-3-29
Interesting. I'll have to keep that in mind.
类别
在 帮助中心 和 File Exchange 中查找有关 Map Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
