getting coordinates from gui axes
이전 댓글 표시
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
Adam
2017년 1월 27일
What aspect of get( gca, 'CurrentPoint' ) 'doesn't work'?
답변 (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
micpro
2017년 1월 27일
Purushottama Rao
2017년 1월 27일
편집: Purushottama Rao
2017년 1월 27일
You can use 'enter' after the selection of required number of data points.
micpro
2017년 1월 27일
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!