different symbols with different colors in a same legend
1 回表示 (過去 30 日間)
古いコメントを表示
I would like to use a single legend line for symbols of different colors.
For example, something like below would put two circle symbols of different colors in the same line followed by the texts:
legend = '{\color{blue}O} {\color{green}O} legend1'
How do I do that in a plot legend in a general way?
The example given in the link below allows multiple symbols on the same line, but there doesn't seem to be a way to assign different colors.
0 件のコメント
回答 (1 件)
Walter Roberson
2024 年 2 月 4 日
There isn't any way to do that with legend()
You might want to start with https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m-a-more-flexible-customizable-legend and customize the code
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!