get line plot data just by mouse stay on it (without click)
Afficher commentaires plus anciens
I plot my data and I need to show data (Y) in text box when I put the mouse cursor on it (without click), is there any fuction that help me?
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 28 Jan 2013
0 votes
datacursormode() with a custom callback function that sends the coordinate to the edit box as well as displaying it on the screen.
1 commentaire
Morteza
le 28 Jan 2013
Jan
le 28 Jan 2013
0 votes
You can use the WindowsButtonMotion function of the parent figure. There OVEROBJ can check, if the mouse is over the specified axes and the CurrentPoint property of this axes contains the coordinates. Now you need a method to find the nearest (interpolated?) point of your data for the display.
Catégories
En savoir plus sur Data Exploration dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!