作者eve2508 ()
看板MATLAB
标题[请教] 关於contourm绘图问题
时间Sat Sep 21 21:11:09 2013
问题描述:
今天在用contourm画图,有几个问题一直搞不定
我想把三种场等值线场画在一起 (2种等值线绘图 1种画shading)
画出的图如下:
http://ppt.cc/VIa9 (google 云端硬碟连结)
但是有几个问题想要请教版上各位大大
1.画完图後发现等值线的label不会盖住底下的线
调整很久还是无法,不知道到底哪边有问题.
2. 若没有设定figure底色(ex 白色)的话,
我用print指令输出的图会变成这个样子
http://ppt.cc/tUp6
我猜是因为画shading的部分造成的,但不知道原因为何....
3. 画这张图超容易让matlab当掉(我猜也是因为shading部分)
不知道是否有人知道我的程式写法有没有问题存在呢?
谢谢
以下附上画图程式码, 恳请伺教罗!!
hFig = figure('Color',[1 1 1]);
set(gcf,'PaperPositionMode','auto')
set(hFig, 'Position', [350 300 600 600])
h=axesm ('stereo','Grid', 'off','MapLatLimit',[20 90],'Origin',[90 120
0],'Frame','on','FLineWidth',2,...
'MeridianLabel','off','MLabelParallel','south','LabelRotation','off');
axis off
load coast
plotm(lat, long,'k-','color',[0.3,0.3,0.3],'LineWidth',1)
tightmap
%
projn=[proj,proj(:,1)];
[C,h]=contourm(yy,[xx,360],projn,floor(min(a(:,k))):0.4:ceil(max(a(:,k))),'k-','LineWidth',1.5);
text_handle = clabelm(C,h,'LabelSpacing',300);
set(text_handle,'BackgroundColor','white','FontSize',9,'margin',0.2)
hold on
%
projn1=[proj1,proj1(:,1)];
[C1,h]=contourm(yy,[xx,360],projn1,floor(min(aa(:,k))):0.1:ceil(max(aa(:,k))),'k-.','LineWidth',1.5);
text_handle = clabelm(C1,h,'LabelSpacing',300);
set(text_handle,'BackgroundColor','white','FontSize',9,'margin',0.2)
hold on
%
projn2=[proj2,proj2(:,1)];
contourm(yy,[xx,360],projn2,[0.3:0.05:0.8],'Fill','on','LineColor','none');
colormap(flipud(gray))
set(gca,'Clim',[0.3 0.8])
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.36.196