How can I add both numbers and text as legend in a plot?
224 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jørgen
el 4 de Dic. de 2013
Comentada: Walter Roberson
el 25 de Dic. de 2017
I have a matrix called x, which contains 8 numbers. I have then a plot, and I can get the numbers as legend by writing legend(num2str(x(1)),.....), but I also want one letter after each number in the legend. Have tried to write legend(num2str(x(1)) 'V',.....) etc. but with no success. Have searched a while after a solution, but can't find any.
0 comentarios
Respuesta aceptada
sixwwwwww
el 4 de Dic. de 2013
use
legend(strcat('Some text', num2str(someValue)))
Más respuestas (0)
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!