How can I read the point coordinates from a graphic?
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to read the x and y coordinates of a certain point of the graphic when I click in that point. Is there any way to do it?
Sorry for my bad English!
Thanks
댓글 수: 0
채택된 답변
Image Analyst
2013년 4월 25일
Try ginput:
plot(1:10);
grid on;
uiwait(msgbox('Click a point'));
[x,y] = ginput(1)
댓글 수: 2
Image Analyst
2013년 4월 25일
Have a button with a captions that says something like "Select a point..." and then call that code (put it in the button callback) when the user clicks the button, which indicates that they are ready to specify a point on the axes.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!