How do I label individual data points on an imagesc plot?
显示 更早的评论
I just want to label specific points in the plot with their coordinates. Does anybody know how I could go about doing this?
Thanks
回答(1 个)
Image Analyst
2013-3-16
0 个投票
Would you consider using the text() function?
2 个评论
Kai Moncino
2013-3-16
Image Analyst
2013-3-16
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);
类别
在 帮助中心 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!