hi,guys,
my code is to plot 3 sets of data,in blue ,red and green respectively, however, the legend is not match for the third one (it is the same with the 2rd one), can anyone help me?
————————————————————————————————–
clear
filename = '1.log';
set = 768;
fid = fopen(filename,'r');
[num1,num2] = textread(filename,'%d%d');
lines = get_lines(fid);
length = 1:1:lines;
title('haha');
xlabel('hehe');
ylabel('heihei');
plot(length,num1,'-b*',length,set,'-r',length,num2,'-go');
hleg = legalpha('1','2','3');
fclose('all');
the results:
Best Answer