How can I plot a number over its assigned value?
Show older comments
I read this for plotting letters, how can I plot the number over its assigned value?
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 ])
Accepted Answer
More Answers (0)
Categories
Find more on Title in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!