Clearing GUI axis difficulty
19 ビュー (過去 30 日間)
古いコメントを表示
I have a GUI that has two axis. The first axis is my original image and the second axis is my filtered image where I am able to apply various filters to change the image. I have a Reset command which I want to Reset both axis's to be blank to allow the user to input another image. I used the matlab command.
arrayfun(@cla,findall(0,'type','axes'))
Which clears both axis but when I load an image it loads it into the second axis and not the first axis. Then when I apply filters it just filters the second axis image leaving the first one blank. Any ideas how to fix this? I have tried storing both axis as global variables and then using cla but this gives me the same problem as before.
0 件のコメント
採用された回答
Walter Roberson
2013 年 12 月 2 日
2 件のコメント
Walter Roberson
2013 年 12 月 2 日
OriginalAxis = findobj(gcf,'Tag','axes1');
imshow(X, 'Parent', OriginalAxis);
その他の回答 (1 件)
Image Analyst
2013 年 12 月 2 日
Use this code:
axes(handlesToAxes1);
cla('reset');
axes(handlesToAxes2);
cla('reset');
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!