Is there a MATLAB function that allows users to include non-Greek symbols in legends and text boxes?

2 次查看(过去 30 天)
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;
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.

采纳的回答

Star Strider
Star Strider 2015-2-3
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.

更多回答(1 个)

Brad
Brad 2015-2-4
Right on, caught a good break with this one!!
Thanks Strider!

类别

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