Is there a MATLAB function that allows users to include non-Greek symbols in legends and text boxes?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Brad
am 3 Feb. 2015
Kommentiert: Star Strider
am 4 Feb. 2015
Hi,
I'm attempting to create a simple legend or textbox that includes non-Greek symbols and text. I'm using the following modified sample code from the MATLAB documentation;
plot(1:10);
str = {'Straight Line', 'Plot of 1 to 10', 'and nothing else'};
annotation('textbox', [.2 .4, .1, .1], 'String', str);
The following plot is produced;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147017/image.png)
Is it possible to add symbols including asterisks, circles, and diamonds to the beginning of each of these strings?
The end result would look like this, only with the actual symbols;
Asterisk Straight Line Diamond Plot of 1 to 10 Circle and nothing else
Any adivce is greatly appreciated. Thank you.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Feb. 2015
See Text Properties, specifically ‘► Interpreter’. F’rinstance, ‘ * ’ is \ast, ‘ ♦ ’ is \diamondsuit, and so forth. I’m not certain what you want to do, but you could also experiment with the legend function.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!