get line plot data just by mouse stay on it (without click)
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 28 Jan. 2013
0 Stimmen
datacursormode() with a custom callback function that sends the coordinate to the edit box as well as displaying it on the screen.
1 Kommentar
Morteza
am 28 Jan. 2013
Jan
am 28 Jan. 2013
0 Stimmen
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.
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!