[ax,h1,h2]=plotyy(x,a,x,sig0);
set(ax,'xlim',[7.4,8.4],'xminorgrid','on')%設定x軸範圍,並顯示更細密的網格
set(h1,'color','k','linewidth',1);%設定y1的顏色為黑色,線寬為1
set(h2,'color','r','linewidth',1);%設定y2的顏色為紅色,線寬為1
set(get(ax(1),'ylabel'),'string','ssha/m')%設定y軸的名稱
set(get(ax(2),'ylabel'),'string','sigma0/db')
set(ax(1),'ytick',[-0.6:0.1:0.6])%設定y軸的取值範圍
set(ax(2),'ytick',[10:1:20])
set(ax(1),'ycolor','k','fontsize',14)%設定y軸顏色和字型大小
set(ax(2),'ycolor','r','fontsize',14)
grid on
xlabel('latitude/°n')
% set(gca,'xscale','log')
title(['cycle:',cycle,' pass:',pass])
set(gca,'fontsize',14)
x1,y1是圖的左下角座標(相對於整個螢幕),dx,dy是圖沿x,y方向的大小;
set(gcf,'position',[10,300,2000,600]);
% [ax,h1,h2] =
plotyy(t,z1,t,z2,'semilogy','plot');
[ax,h1,h2] = plotyy(node,bconf,node,msd,'plot','plot');
set(h1,'linestyle',':','marker','x','color','b');%曲線的線型
%set(h1,'linestyle','-','marker','o','color','g');
set(h2,'linestyle',':','marker','x','color','r');
set(get(ax(1),'ylabel'),'string','initial\_bconf');%x座標軸名稱
set(get(ax(2),'ylabel'),'string','msd');
set(get(ax(2), 'ylabel'),'color','red');
% set(ax(1),'ytick',[0:10:350])
% set(ax(2),'ytick',[0:10:350])
xlabel('mrf node');
title('different initial\_bconf for different mrf nodes');
set(gca,'ycolor','b');%改變y座標軸顏色
Matlab中的plotyy用法總結
在梳理資料,或者寫 的時候往往需要畫出兩個縱座標不同的圖,以顯現兩組資料的不同變化,在這種情況下,一般兩組資料的橫座標均是相同的,但是縱座標確實不是乙個數量級的,所以為了更好的表現兩組資料的變化趨勢,需要用到plotyy函式繪製雙縱座標的二維圖,具體用法總結如下 呼叫格式 1.plotyy x1,y...
python order函式 Python函式之二
關鍵字引數 kwargs def foo kw if y in kw print kw y foo x 123,y 1232 如上面的示例關鍵字引數用於函式呼叫,通過 鍵 值 形式加以指定。這種方式可以根據傳入的引數來決定函式的執行方向。可以讓函式更加清晰 容易使用,同時也清除了引數的順序需求,及時...
內聯函式,建構函式,靜態函
inline,static,constructor三種函式都不能帶有virtual關鍵字。inline是編譯時展開,必須有實體 static屬於class自己的,也必須有實體 virtual函式基於vtable 記憶體空間 constructor函式如果是virtual的,呼叫時也需要根據vtabl...