Crusor position without click relative to axis

1 回表示 (過去 30 日間)
Mariano De Luca
Mariano De Luca 2021 年 4 月 8 日
編集済み: Adam Danz 2021 年 4 月 12 日
Dear all, I want to get the position of crusor in an Axes without clicking on it. How can I do this ?
with :
C = get (gca, 'CurrentPoint');
disp(C);
it works only if i click on the figure
and with :
C= get(0,'PointerLocation');
i get the position relative to all the screen and not the axes. How i can solve it?

回答 (1 件)

Adam Danz
Adam Danz 2021 年 4 月 8 日
編集済み: Adam Danz 2021 年 4 月 12 日
Follow instructions in this answer which explains two methods to continually return the coordinates of the cursor within the axes.

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by