Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Dynamically alter datatip behavior

Asked by Matt J

Matt J (view profile)

on 8 Oct 2012
Accepted Answer by Matt J

Matt J (view profile)

I have a GUI containing an image axis and some radio buttons. I want the behavior/appearance of new figure datatips introduced into the image window to be determined based on the state of the radio buttons.

When a different radio button is selected, I update the datacursormode object's UpdateFcn. However, I find that it doesn't take effect on how new datatips look if there are prior data tips already present in the figure. After I delete the prior datatips manually, the new UpdateFcn does kick in and things work fine. Why is this necessary?

Also, if it's absolutely necessary to delete all prior data tips to make this work, how do I do so programmatically?

1 Comment

Walter Roberson

Walter Roberson (view profile)

on 8 Oct 2012

Interesting behavior.

Matt J

Matt J (view profile)

Tags

Products

No products are associated with this question.

1 Answer

Answer by Matt J

Matt J (view profile)

on 17 Oct 2012
Accepted answer

A solution was eventually found in the Newsgroup

http://www.mathworks.com/matlabcentral/newsreader/view_thread/323647

0 Comments

Matt J

Matt J (view profile)

Contact us