How to label each data point in a MatLab plot, like the following figure?

MatLab code:

x = [1:10]; y = x + rand(1,10); figure('color','w'); plot(x,y,'o'); a = [1:10]'; b = num2str(a); c = cellstr(b); dx = 0.1; dy = 0.1; text(x+dx, y+dy, c);

It also works on 3D plot:

Receive email notification via email

Don't want to miss new papers in your field? Check out Stork we developed:

Perfect answer, thank you

Thanks a lot. Your article helped me.