clf;set(gcf,'color','w');
%清理;设置背景颜色
m_proj('oblique','lon',[-125.3 -122.6],'lat',[50.1 48.6] ,'dir','vert','aspect',0.45)
%投影
% Database 1 coastline
m_usercoast('/ocean/rich/more/mmapbase/bcgeo/PNW.mat',...
'patch',[.8 .8 .8],'edgecolor','k');
% Database 2 river
m_usercoast('/ocean/rich/more/mmapbase/bcgeo/PNWrivers.mat',...
'patch',[.8 .8 .8],'edgecolor','k');
%数据集水深与河流
% Elevation database in structure SOGbath
hold on; m_contourf(SOGbath.lon,SOGbath.lat,SOGbath.Z,[500 500],...
'edgecolor','none','facecolor',[.7 .7 .7]); hold off;
%高程数据
m_grid('linewi',2,'tickdir','out','ticklen',.03,'linestyl','none','color','k');
m_northarrow(-125.4,49.7,.2,'type',2);
title({'Winter','ONDJFM',' '},'fontsize',14);
% Wind data in struct arrays - pass each parameter to M_WINDROSE as a 1xN
% cell array of data in the order you want them plotted (ones on top later
% in list)
levels=[0:4:24]; % Binning for speeds
k=[1 15 18 6 3 19 4 5 7 8 10 9 11 12 2 13 14 16 17 ]; % change order to
% make overlaps look nicer
%改变加载顺序
m_windrose({Winter(k).lon},{Winter(k).lat},{Winter(k).wdir},{Winter(k).wspd},...
'size',.17,'nspeed',levels,'alpha',1);
%风的玫瑰花图
colormap(m_colmap('jet'));
caxis([0 24]);
%玫瑰花图加色
axb=m_contfbar(.8,[.6 .9],levels,levels);
axb.YLabel.String='Wind speeds m/s';
axb.YTick=levels;
%玫瑰花图的colorbar
加载的一些colorbar
% This command generates the figure
% In each subplot title is the M_COLMAP call that
% generated the colourmap displayed.
%
% Uses of these colourmaps can be seen
% in other maps in this gallery.
m_colmap demo