How to get WindowButtonMotionFcn to track mouse position
Show older comments
Hello everyone,
I'm writing a GUI code in wich I basically need to track the position of the mouse in a UIAxes ,and then draw a veritcal line in this position, where some plot are already existing. I've seen in other questions that a WindowButtonMotionFcn could help me to do that but I'm not able to create it. I've also tried with a get(axes_handle,'CurrentPoint') but the problem comes out when I need to point right over a prevoius line for wich no output is given by the "get" function. Could anyone explain me how to get a WindowButtonMotionFcn or at least give me suggestion on how to track mouse position?
Thank you in advance for your help.
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!