MATLAB: Is there any way to display a value instead of circles for points on a plot

http://stackoverflow.com/questions/5606958/mark-points-with-a-value-in-a-matlab-plothttps://in.mathworks.com/matlabcentral/newsreader/view_thread/168412

Is there any way to display a value instead of circles for points on a plot?

Best Answer

a=1:10:100;
b=sin(a);
plot(a,b);
labels = arrayfun(@(A,B) sprintf('%g:%g', A, B), a, b, 'Uniform', 0);
text(a, b, labels)