Crusor position without click relative to axis

조회 수: 2 (최근 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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by