|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
%% Tm-Ps C. \' W0 r# ^: M) l
figure(2) w ?* a$ I6 Z" f n) C3 z$ B
[AX,H1,H2]=plotyy(Dyear,Tm1,Dyear,Ps,'plot');0 m3 n# d/ @. p6 @& ?
hold on;4 g0 O4 U9 G8 e- l
set(AX(1),'ylim',[240 310]); % 坐标轴范围" o; H E8 c1 ^5 S7 b5 v( |
set(AX(1),'ytick',[240:10:310]) %坐标轴刻度, d. v4 |# W4 w' L& T# \
set(AX(1),'yticklabel',[240:10:310])
( C* G$ w; o6 q i( p Iset(AX(2),'ylim',[900 1050]);
8 R% T5 V- p& ~, z6 l7 pset(AX(2),'ytick',[900:50:1050]) %坐标轴刻度. Q, ^" f8 n7 d( b
set(AX(2),'yticklabel',[900:50:1050])
3 i2 M6 Q+ L t8 q) v- Y, Mset(H1,'color','r')
1 `& T+ L, L/ V2 F7 j6 j5 d, Cset(H2,'color','c')) E/ X& K, R9 C4 ~# D1 u U- C
legend([H1,H2],'Tm','Ps',0);" j( D/ l$ U& f+ y) j
hold off;! {( o7 C3 e5 w" L1 z& t X) s
这是我使用的代码,但是执行指挥出现报错无法添加图例,请求大神指点一下如何修改。- L* ]; w4 W* N, Z/ A0 a2 |( C
|
|