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 个)
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!