This short function will generate a legend based on 'Tag' information given by plot. A legend title is also possible.
figure; hold on; x = 1:10; plot(x,x,'Tag','Positive'); plot(x,-x,'Tag','Negative'); labelplot('eo','v','Slope');
The above example is equivalent to
legend('Positive','Negative')
and adding a text box 'Slope' above it.
引用格式
Will Robertson (2026). labelplot (https://ww2.mathworks.cn/matlabcentral/fileexchange/11234-labelplot), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2006a
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Legend 的更多信息
