get line plot data just by mouse stay on it (without click)
11 views (last 30 days)
Teja Muppirala on 28 Jan 2013
Here is a simple example that outlines how to do it using HITTEST.
this = hittest;
cp = get(gca,'currentpoint');
ht = title(num2str(cp([1 3])));
More Answers (2)
Walter Roberson on 28 Jan 2013
datacursormode() with a custom callback function that sends the coordinate to the edit box as well as displaying it on the screen.
Jan on 28 Jan 2013
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.