MATLAB Answers

0

How to enable data tips?

Kacper Gawinkowski さんによって質問されました 2019 年 11 月 16 日 15:11
最新アクティビティ Adam Danz
さんによって コメントされました 2019 年 11 月 17 日 15:01
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

  0 件のコメント

サインイン to comment.

1 件の回答

Adam Danz
Answer by Adam Danz
on 16 Nov 2019 at 22:18
Edited by Adam Danz
on 16 Nov 2019 at 22:20

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?

  2 件のコメント

Kacper Gawinkowski on 17 Nov 2019 at 10:52
im using r2019b if thats what you are asking
Adam Danz
on 17 Nov 2019 at 15:01
In r2019b data cursor mode should be on by default.
Try running enableDefaultInteractivity(app.UIAxes) (although I'm not sure if that is supported by UIAxes yet).
If that doesn't work, you could attach your mlapp file so we can poke around.

サインイン to comment.



Translated by