Crusor position without click
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear all, I want to get the position of crusor in an Axes without clicking on it. How can I do this ?
I read this one solution http://www.mathworks.com/support/solutions/en/data/1-1V97EZ/?solution=1-1V97EZ but currentpoint of Axes is the Location of last button click, I have to manage it wihout click.
Thank you in advance
1 Commento
Ivan van der Kroon
il 20 Mag 2011
This link shows you how to get the data. You do not have to click anywhere, but you have to find a way to store the data in an array. The example gives it as a title in the figure, so you can figure out yourself how to save it, right?
Risposte (2)
Jan
il 20 Mag 2011
This gets the absolute coordinates of the pointer:
get(0, 'PointerLocation')
Getting the local coordinates relative to an AXES of FIGURE is not trivial in Matlab 2009a for docked figures. The commands OVEROBJ and HITTEST might be helpful also.
1 Commento
Franck paulin Ludovig pehn Mayo
il 11 Gen 2022
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!