How can I add both numbers and text as legend in a plot?
220 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jørgen
am 4 Dez. 2013
Kommentiert: Walter Roberson
am 25 Dez. 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 Kommentare
Akzeptierte Antwort
sixwwwwww
am 4 Dez. 2013
use
legend(strcat('Some text', num2str(someValue)))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!