How do I continuously read the mouse position as the mouse is moving only on axes on a figure

4 ビュー (過去 30 日間)
Hi,
I want to read and show the mouse position continuously on my figure. But I want to show it only when the mouse is on the axes and not on the figure.
How can I do it?

採用された回答

Jan
Jan 2019 年 1 月 21 日
Use the 'WindowButtonMotionFcn' and display the changes only, when the mouse is over the axes. You can do this either by comparing the coordinates or maybe by the undocumented function hittest(FigHandle), which replies the object is mouse is over.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by