Ever since I updated to Matlab 2020, there is an annoying feature such that if I happen to click the cursur in a figure, it will add a little "pin" showing the coordinates of the closest data point. Can I turn this new feature off? It's causing me lots of problems.

 채택된 답변

Jan
Jan 2021년 4월 14일

0 개 추천

Include this in the startup.m function:
if ~verLessThan('MATLAB','9.7')
set(groot, 'defaultAxesCreateFcn', @(ax,~) disableDefaultInteractivity(ax))
end

댓글 수: 5

Nils Tilton
Nils Tilton 2021년 4월 14일
Thanks, I tried that earlier, but it didn't seem to work. I wonder if it has to do with the "if ~verLessThan('MATLAB','9.7')". Could you explain what that if statement is needed for?
Could you explain what didn't work?
verLessThan merely determines if your current Matlab release is r2019b (9.7) or later but disableDefaultInteractivity was released in r2018b so I believe the condition should be,
if ~verLessThan('MATLAB','9.5')
disableDefaultInteractivity(ax) turns off data tip interactivity unless you re-enable it by pressing the datatip tool button or something else turns it back on for those axes.
Nils Tilton
Nils Tilton 2021년 4월 14일
For some reason, the change didn't take at first, even after I restarted matlab a few times. But now, it seems to work. At one point, I removed the if statement, but I am not sure if that's what did the trick. In any case, it works now! Thanks very much to both of you for your help :)
Adam Danz
Adam Danz 2021년 4월 14일
Don't forget to accept Jan's answer (blue accept answer button).
Glad you got it worked out!
Nils Tilton
Nils Tilton 2021년 4월 14일
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2021년 4월 13일

댓글:

2021년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by