GUI - axes visibility

Hello, firstly,sorry for my bad english.. So,i have a problem with my GUI. In my image processing GUI there are two axes and three buttons. In the first axes is the original image and in the second the segmented. The thing that i want to do ,is,when i click the third button,all the buttons and the first axes(the original image) will disappear. So,i found this code for the buttons and its ok: for examle, set(handles.OpenImage, 'Visible','off');(OpenImage is the Tag for the first button). But how i can do the same thing for the axes? I tried this code for the axes and it doesn't working.. Thanks a lot in advance.

1 个评论

Please post a copy of what you have tried and explain what "it doesn#t work" means. If you get an error message, post it completly.

请先登录,再进行评论。

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2011-10-20

0 个投票

It looks like that when you show an image on the axes, the axes is automatically set to be invisible. You will need to find the handle of the image object and then set it to be invisible.
For example, in your push button callback, you can do this, assume the tag of the axes is a
h=findobj(handles.a,'type','image'); set(h,'visible','off')
You can pause there, try set(handles.a,'visible','on')
If you want to delete the image, use delete(h);

类别

在 帮助中心 和 File Exchange 中查找有关 Data Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by