%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%持续更新。 当前:
20100108 %
%仅作笔记。 作者: keyflying %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
legend有时候挺烦人的,尽管大多时候挺好用。
基本数据:
data = rand(25)+repmat(1:25,25,1);
H = plot(data);
基本用法:
legend({'str1','str2','strn'});
高级用法1:指定legend显示的位置:
legend({'str1','str2','strn'},1);
legend({'str1','str2','strn'},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:Ins