How to enable data tips?

조회 수: 38 (최근 30일)
Kacper Gawinkowski
Kacper Gawinkowski 2019년 11월 16일
댓글: Adam Danz 2020년 10월 18일
Hi guys, i have a problem with enabling data tips in matlab R2019b.
Im using app designer and would like to add data tips to the UIAxes.
I try using:
datacursormode(app.Bitmap);
where app.Bitmap is the UIXes name, but it gives me an error saying
"Error using datacursormode (line 154)
Invalid figure handle"
So i have no idea what to do now and Id prefer not to make a figure outside GUI.
Thanks in advance

답변 (1개)

Adam Danz
Adam Danz 2019년 11월 16일
편집: Adam Danz 2020년 2월 18일
The optional input to datacursormode() is a figure handle, not an axis handle. Data cursor mode has only recently been supported in app designer axes and it's 'on' by default. The datacursormode() does not have an effect on app designer figures, though (r2019b, according to my test)
What release of Matlab are you using?
Also see
  댓글 수: 10
Nick Bennett
Nick Bennett 2020년 10월 18일
Great! The functionality you highlight is precisely what we need to help migrate some of our GUIDE applications to appdesigner. Thank you again, Adam, for your expert advice and assistance on this. Much appreciated.
Adam Danz
Adam Danz 2020년 10월 18일
Thanks for the feedback, Nick.
If you wanted to format the datatip to make it appear like the default style, you can follow another demo of mine in this comment:

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

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by