1、最简单的plot(x,y);
2、横纵坐标:xlabel('横坐标'); ylabel('纵坐标');
3、在不删除前面的基础上继续画图,在plot后面加hold on;
4、plot曲线颜色,plot(x,y,'Color','r'),其中r表示红色,此外还有'g'、'b'、'c'等;
5、plot曲线形状,plot(x,y,'LineStyle','+');
6、plot曲线线宽,plot(X,Y,'LineWidth',3)或cv= plot(X,Y),set(cv(1),'LineWidth',3);
7、曲线名称标注:legend
(1)最简单的:legend('曲线1’,'曲线2'),分别对应曲线1、2;
(2)指定位置:
legend({'str1','str2','strn'},'Location','SouthEast');
可选的位置很多:
North:Inside plot box near top
South:Inside bottom
EastI:nside right
West:Inside left
NorthEast:Inside top right (default)
NorthWest:Inside top left
SouthEast:Inside bottom right
SouthWest