下载地址:https://www.eoas.ubc.ca/~rich/map.html
Release Note
New in release 1.4i:
- Finally sorted out the major "2014b and later matlab graphics engine" related problems with de >m_gridde>, as well as many minor graphics improvements.
- de >m_windbarbde> and de >m_streamlinede> for meteorologists, also de >m_scatterde>.
- A set of useful colourmaps in de >m_colmapde>, including a perceptually uniform "jet-like" colourmap.
- A colourbar function de >m_contfbarde> made to work with de >contourfde> plots.
- de >m_annotationde> and de >wysiwygde> to help you add arrows and things.
- Updated the documentation so it doesn't have that "1990s" look.
- Added link to a Chinese translation of the Users Guide, as well as to the mapping GUI MAP-LAB which is built on top of M_Map.
- List of coded examples updated, and a few new ones added.
1、终于跟Matlab2014b之后的版本兼容,实际上就是把m_grid里面的一个插值方式改一下,这个很简单
2、增加了m_colmap 得到了 blues green diverting这几个色阶
colormap(m_colmap('blues')); 就这么用,蓝色大海,绿色森林都漂亮多了
3、增加了colorbar命令 m_contfbar,配合m_contourf使用,可以画两头尖尖的grads bar,总之相当美貌
4、内置help改头换面,位置也从private子文件夹换到了根目录下,一个是gallery一个是userguide,可以继续拖到桌面上离线使用了。
figure(1)
m_proj('lambert','long',[-160 -115],'lat',[32 60]);
[CS,CH]=m_etopo2('contourf',[-7000:1000:-1000 -500 -200 0 ],'edgecolor','none');
% m_gshhs_f('patch',[.7 .7 .7],'edgecolor','none');
% m_gshhs_f('save','etopo2');
m_usercoast('etopo2','patch',[.7 .7 .7],'edgecolor','none');
% h1=m_line(vents.lon,vents.lat,'marker','s','color',[0 .5 0],...
% 'linest','none','markerfacecolor','w','clip','point');
% h2=m_line(lp.POS(:,2),lp.POS(:,1),'marker','o','color','r','linewi',2,...
% 'linest','none','markersize',8,'markerfacecolor','w');
m_grid('linest','none','tickdir','out','box','fancy','fontsize',16);
% legend([h1(1),h2(1)],'Known Hydrothermal vents','Line-P Stations','location','southwest');
colormap(m_colmap('blues'));
caxis([-7000 000]);
% [ax,h]=m_contfbar([.55 .75],.8,CS,CH,'endpiece','no','axfrac',.05,'levels','match');
[ax,h]=m_contfbar([.55 .75],.8,CS,CH,'endpiece','yes','axfrac',.05,'levels','match');
title(ax,'meters')
set(gcf,'color','w'); % otherwise 'print' turns lakes black
%%
figure(2)
m_proj('miller'); % Map first
m_coast;
m_grid;
orient landscape; % Fix the orientation, and...
wysiwyg; % make the screen version match the (future) printed version
m_annotation('textarrow',[-140 -122.6],[20 49.35],'string','Vancouver')
%%
figure(3)
m_proj('lambert','lon',[-10 20],'lat',[33 48]);
[CS,CH]=m_etopo2('contourf',[-5000:500:3000],'edgecolor','none');
m_grid('linestyle','none','tickdir','out','linewidth',3);
colormap([ m_colmap('blues',40); m_colmap('greens',24)]);
brighten(.5);
ax=m_contfbar(1,[.5 .8],CS,CH);
title(ax,{'Level/m',''}); % Move up by inserting a blank line
%%
saveas(1,'ocean.jpg');
saveas(2,'landscape.jpg');
saveas(3,'continent.jpg');