| |
t=0:.1:8; [ax,h1,h2]=plotyy(t,sin(t),t,cos(t)); set(h1,'linestyle','-','marker','o','color','r'); set(h2,'linestyle',':','marker','x','color','b'); |
x=linspace(0,2*pi,40); [ax,h1,h2]=plotyy(x,sin(x)+cos(x),x,exp(x)); set(h1,'linestyle','-') set(h2,'linestyle','-') set(h1,'marker','o') set(h2,'marker','+') hold on x=linspace(0,2*pi,40); hh=line(x,cos(x)); set(hh,'linestyle','-') set(hh,'marker','s') hold on hhf=line(x,sin(x)); set(hhf,'color','r') set(hhf,'linestyle','-') set(hhf,'marker','*') legend([h1,h2,hh,hhf],'sin(x)+cos(x)','exp(x)','cos(x)','sin(x)',0); |
figure; t=0:.1:3*pi; [H,Ha,Hb]=plotyy(t,sin(t),t,exp(t)); d1=get(H(1),'ylabel'); set(d1,'string','yayacpf'); d2=get(H(2),'ylabel'); set(d2,'string','bbs from hit','fontsize',18); |