different symbols with different colors in a same legend

12 visualizaciones (últimos 30 días)
Zhong Chen
Zhong Chen el 4 de Feb. de 2024
Comentada: Zhong Chen el 6 de Feb. de 2024
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Feb. de 2024
There isn't any way to do that with legend()
  1 comentario
Zhong Chen
Zhong Chen el 6 de Feb. de 2024
Thanks for the answer. I think I may just do a text box using LaTex, or post process the graph in Inkscape.

Iniciar sesión para comentar.

Categorías

Más información sobre Legend en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by