How to enable data tips?

81 views (last 30 days)
Kacper Gawinkowski
Kacper Gawinkowski on 16 Nov 2019
Commented: Adam Danz on 18 Oct 2020
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:
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

Answers (1)

Adam Danz
Adam Danz on 16 Nov 2019
Edited: Adam Danz on 18 Feb 2020
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
Adam Danz
Adam Danz on 18 Oct 2020
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:

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!