How do I label individual data points on an imagesc plot?

7 visualizaciones (últimos 30 días)
Kai Moncino
Kai Moncino el 16 de Mzo. de 2013
I just want to label specific points in the plot with their coordinates. Does anybody know how I could go about doing this?
Thanks

Respuestas (1)

Image Analyst
Image Analyst el 16 de Mzo. de 2013
Would you consider using the text() function?
  2 comentarios
Kai Moncino
Kai Moncino el 16 de Mzo. de 2013
Yes that was my plan. But I don't know how to isolate the points that I want to label. Also, should I just use num2str command to create the label?
Image Analyst
Image Analyst el 16 de Mzo. de 2013
Well obviously you have to know the coordinates of what you want to label. Then you create your text label with sprintf() and then put it over the image with text(). For example:
textLabel = sprintf('(%.2f, %.2f)', column, row);
text(row, column, textLabel);

Iniciar sesión para comentar.

Categorías

Más información sobre Axis Labels en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by