MATLAB: Plotting letters instead of symbols

lettersplots

Hi I'm really new to MATLAB and I'm generating images which are a set of 9 letters encased in a rectangle. I can do this with symbols (such as +) but I need to use letters in place of the symbols.
How do I replace the symbols with normal letters?
Thanks

Best Answer

You have to use the text function to label your points with letters.
Example:
x = randi(10, 1, 5); % Create Data
y = randi(10, 1, 5);
L = strsplit(sprintf('%c\n','A':'E')); % Letter Labels
figure(1)
plot(x, y, '+r')
text(x, y, L(1:length(x)), 'HorizontalAlignment','center', 'VerticalAlignment','bottom')
axis([-0.5 10.5 -0.5 10.5 ])