getting coordinates from gui axes
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi,
I work with a GUI includes axes ( matlab2016a ),
I already activated the datacursor in gui side (from toolbar),
I can see coordinates when I click to graph,
But I want to get coordinates of mouse click, I mean reading the values, x and y,
I try with cp = get(gca,'CurrentPoint');
Does not work.
Can anyone help?
Regards.
댓글 수: 1
답변 (1개)
Purushottama Rao
2017년 1월 27일
편집: Purushottama Rao
2017년 1월 27일
You can use one of these commands to read the data on mouse click.
[x, y] = getpts(fig)
or
[x, y] = getpts(ax)
댓글 수: 3
Purushottama Rao
2017년 1월 27일
편집: Purushottama Rao
2017년 1월 27일
You can use 'enter' after the selection of required number of data points.
참고 항목
카테고리
Help Center 및 File Exchange에서 Visual Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!