Getting borders to appear on a map
조회 수: 14 (최근 30일)
이전 댓글 표시
I am looking at sea surface temperatures in the North Pacific and trying to get borders to appear on my plots. I can only get the Alaska/Canada border (not the Russian one - see attached images). I know I could read through the Mapping Toolbox User's Manual and figure it out, but I am in a bit of a time crunch and wondering if anyone has a simple solution.
Right now the code I have to generate plots like those attached is:
figure (1) pcolor (lonSST', latSST', imrotate (mean (anomSST, 3), -90)) shading flat; colorbar hold on geoshow ('landareas.shp', 'FaceColor', 'white'); title ('Average SST anomaly','FontSize', 13, 'LineWidth', 1.75); xlabel ('Longitude'); ylabel ('Latitude');
Thanks, Sylvia.
댓글 수: 0
채택된 답변
Rob Comer
2013년 11월 28일
Your call to geoshow isn't showing land areas west of -180 degrees because its working in an ordinary axes. Try setting up a map axes first. You could replace your call to figure with something like this:
figure('Color','w')
ax = worldmap([18 72],[-245 -110]);
setm(ax,'MapProjection','miller')
tightmap
You'll also have to use pcolorm instead of pcolor (and swap the order of the lat-lon inputs).
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!