Add Legend Automatically Based on Tag Property Value

버전 1.0.0.0 (3.29 KB) 작성자: Hannes Mogensen
Add legend to axes based on values from plot handles Tag property
다운로드 수: 96
업데이트 날짜: 2016/7/30

라이선스 보기

Instead of adding a legend manually and making sure the colors are consistent, use the 'Tag' property for each plot to separate them. Then use the function add_legend to add a legend. The function groups all plots based on their Tag property, and give each group a separate color. It uses the Tag property values as labels in the legend.
I have included the function varycolor by Daniel Helmick:

https://www.mathworks.com/matlabcentral/fileexchange/21050-varycolor

인용 양식

Hannes Mogensen (2024). Add Legend Automatically Based on Tag Property Value (https://www.mathworks.com/matlabcentral/fileexchange/58456-add-legend-automatically-based-on-tag-property-value), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Legend에 대해 자세히 알아보기
태그 태그 추가
도움

받음: varycolor

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Added credit to Daniel Helmick

Updated description