m_map工具箱配置
MATLAB配置m_map過程
(1)下載m_map工具,百度搜索m_map。

(2)將壓縮包解壓縮后,將m_map這個文件夾復(fù)制到你的matlab安裝目錄下的toolbox里面

(3)配置m_map,運行matlab,點擊set path→add folder→找到你剛剛復(fù)制的m_map,選擇,然后保存,然后關(guān)閉

(4)運行測試代碼
subplot(211);
Slongs=[-100 0;-75 25;0 45; 25 145;45 100;145 295;100 295];
Slats= [? ?8 80;-80? 8;? 8? 80;-80? ?8; 8? ?80;-80? ?0; 0 80];
for l=1:7
? ? m_proj('sinusoidal','long',Slongs(l,:),'lat',Slats(l,:));
? ? m_grid('fontsize',6,'xticklabels',[],'xtick',[-180:30:360],...
? ? ? ? ? ? ? ? 'ytick',[-80:20:80],'yticklabels',[],'linest','-','color',[.7 .7 .7]);
? ? m_coast('patch','g');
end
xlabel('Interrupted Sinusoidal Projection of World Oceans');
% In order to see all the maps we must undo the axis limits set by m_grid calls:
set(gca,'xlimmode','auto','ylimmode','auto');
subplot(212);
Slongs=[-100 43;-75 20; 20 145;43 100;145 295;100 295];
Slats= [? 0? 90;-90? 0;-90? ?0; 0? 90;-90? ?0;? 0? 90];
for l=1:6
? ? m_proj('mollweide','long',Slongs(l,:),'lat',Slats(l,:));
? ? m_grid('fontsize',6,'xticklabels',[],'xtick',[-180:30:360],...
? ? ? ? ? ? ? ? 'ytick',[-80:20:80],'yticklabels',[],'linest','-','color','k')
? ? m_coast('patch',[.6 .6 .6]);
end
xlabel('Interrupted Mollweide Projection of World Oceans');
set(gca,'xlimmode','auto','ylimmode','auto');
運行結(jié)果:

歡迎與我交流!1565903211