Wednesday, 7 March 2012

两组数据,不同颜色,现实在plot图中

x1 = data(1:21,2);
t1 = data(1:21,4);

x2 = data(22:40,2);
t2 = data(22:40,4);

plot(x1,t1,'.b',x2,t2,'.r');

%x轴 y轴
xlabel('# Words');
ylabel('# Topics');

添加图标
legend('arm','topic-arm'); %分别将字符串1、字符串2标注到图中,每个字符串对应的图标为画图时的图标。

No comments:

Post a Comment