matlab m_map学习总结系列8
程序员文章站
2024-03-22 09:45:40
...
在这里由于一些文件没办法获取;无法显示
clf;
m_proj('robinson','lon',[-330 30]);
%投影
m_pcolor(LG,LT,dSA*1000);
%pcolor
m_coast('patch',[.7 .7 .7],'edgecolor','none');
m_grid('tickdir','out','linewi',2);
% This is a perceptually uniform jet-like color scale, but in m_colmap
% we can add some simple graduated steps to make the pcolor look a little
% more like a contourf
colormap(m_colmap('jet','step',10));
h=colorbar('northoutside');
%colormap设置
title(h,'\deltaSA/(g/kg) at 2000 dbar','fontsize',14);
set(h,'pos',get(h,'pos')+[.2 .05 -.4 0],'tickdir','out')
set(gcf,'color','w'); % Need to do this otherwise 'print' turns the lakes black
load /ocean/rich/home/dens14/VENTS
lp=load('/ocean/rich/home/dens14/Linep_201402');
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');
%加密海岸线
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]);
%colormap
[ax,h]=m_contfbar([.55 .75],.8,CS,CH,'endpiece','no','axfrac',.05);
title(ax,'meters')
%设置的colorbar前面为对数
set(gcf,'color','w'); % otherwise 'print' turns lakes black