Creating a Legend for a Boxplot with Two Colors
이전 댓글 표시
Hi, I need help inserting a legend for a boxplot with two colors (red & blue). My code for this is:
boxplot(data, 'notch', 'on', 'symbol', '*','colors','rb');
legend('Label1','Label2');
But I get no legend and it says "Warning: Plot empty" in the command window. Any help on this matter would be much appreciated. Thank you.
채택된 답변
추가 답변 (1개)
Oleg Komarov
2011년 6월 28일
1 개 추천
Use the option labels, dunno if it is a bug but legend doesn't seem to work.
카테고리
도움말 센터 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!