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!
