getting coordinates from gui axes
Mostra commenti meno recenti
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 Commento
Adam
il 27 Gen 2017
What aspect of get( gca, 'CurrentPoint' ) 'doesn't work'?
Risposte (1)
Purushottama Rao
il 27 Gen 2017
Modificato: Purushottama Rao
il 27 Gen 2017
You can use one of these commands to read the data on mouse click.
[x, y] = getpts(fig)
or
[x, y] = getpts(ax)
3 Commenti
micpro
il 27 Gen 2017
Purushottama Rao
il 27 Gen 2017
Modificato: Purushottama Rao
il 27 Gen 2017
You can use 'enter' after the selection of required number of data points.
micpro
il 27 Gen 2017
Categorie
Scopri di più su Interactive Control and Callbacks in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!