legend_reverse

版本 3.0 (1.2 KB) 作者: Moses
Create legend in reverse order. Uses the same name-pair arguments as the default legend() function.
45.0 次下载
更新时间 2020/8/27

查看许可证

Create legend in reverse order. Uses the same name-pair arguments as the default legend() function.
-Line plots
-Stacked bar graphs

Example 1:
x = 1:3;
y = [2 2 3; 2 5 6; 2 8 9; 2 11 12];
plot(x, y, 'LineWidth', 2)
legend_reverse('blue', 'red', 'orange', 'purple', 'Location', 'northwest');

Example 2:
y = [2 2 3; 2 5 6; 2 8 9; 2 11 12];
bar(y,'stacked');
legend_reverse('blue', 'red', 'orange', 'Location', 'northwest');

引用格式

Moses (2024). legend_reverse (https://www.mathworks.com/matlabcentral/fileexchange/79577-legend_reverse), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2020a
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

参考作品: Flip bar legend

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
3.0

-Fix function name.

2.0

-Edited function name and example.

1.0