How do I label individual data points on an imagesc plot?
조회 수: 10 (최근 30일)
이전 댓글 표시
I just want to label specific points in the plot with their coordinates. Does anybody know how I could go about doing this?
Thanks
댓글 수: 0
답변 (1개)
Image Analyst
2013년 3월 16일
Would you consider using the text() function?
댓글 수: 2
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);
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!