how to make figure annotation movable by mouse (or "interactive")

I have a question regarding figure annotation. If I use the insert annotation from the figure menu, the annotations created will be movable by the mouse. However, if I create annotation by using the annotation function through code, then I am not able to move that annotation with mouse any more, unless I insert another annotation through the menu. Does anyone know a command that can toggle the interactive nature of the annotations? I am currently creating a custom GUI that requires the annotation to be movable by the user. Thank you.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 10월 20일

0 개 추천

Yes, you can. You just need to run plotedit(Figure) to enable it. When you do the manual insertion, it probably enables the edit mode automatically.

댓글 수: 3

Thanks a lot. It works.
Now a new problem arises. Since I am using it in a GUI, the current annotation is for the whole figure (including all the GUI control buttons), and when plotedit is on, I can no longer press the buttons. Is there any way to toggle the plotedit back to off mode without having to explicitly enter it on the command line, such as using short cuts?
plotedit(Fig,'on');plotedit(Fig,'off');
thanks

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

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

Jun
2011년 10월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by