필터 지우기
필터 지우기

different symbols with different colors in a same legend

조회 수: 1 (최근 30일)
Zhong Chen
Zhong Chen 2024년 2월 4일
댓글: Zhong Chen 2024년 2월 6일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 2월 4일
There isn't any way to do that with legend()
  댓글 수: 1
Zhong Chen
Zhong Chen 2024년 2월 6일
Thanks for the answer. I think I may just do a text box using LaTex, or post process the graph in Inkscape.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by