matlab绘制图形(figure)

时间:2024-10-12 12:33:16

1、用于实现左右纵坐标都有数值:x=0:100;y1=cos(x/20);y2=sin(x/20);plotyy(x,y1,x,y2) %左右纵坐标都有数值annotation('textarrow',[.3,.6],[.7,.4],'String','ABC');

2、绘制白底的背景 figureset(gcf,'color','w');

3、实现标题变量title(['xxx=',num2str(num(i)*2),'A'])

4、绘制带箭头的图像plot(x,y);a=0.129猱蝰逾鸾5;b=0.108;annotation('arr泠贾高框ow',[a a],[0.8 0.96]);annotation('arrow',[0.8 0.96],[b b]);text(150,15.05,'(150,15)','FontSize',10);

5、去掉图像方框set(gca,'box','off');

6、多组曲线绘图plot(time,vnew5,'r',time,vnew6,'b',time,vnew7,&垆杪屑丝#39;g',time,vnew8,'y','linewidth', 4)title('xxx','fontsize',16)xlabel('时间(s)','fontsize',16)ylabel('速度(mm/s)','fontsize',16)legend(['xxx',num2str(Iref1),'A'],['xxx为',num2str(Iref2),'A'],['xxx',num2str(Iref3),'A'],['xxx',num2str(Iref4),'A']);

© 手抄报圈