GUI axes size?
6 ビュー (過去 30 日間)
古いコメントを表示
Hi,
After loading image into an axes, the axes automatically adjust its size to fit the image(i'm happy with it changes size accordingly to image). however after i clear the image the axes size is till the size of the previous image.
How do i set it back to the axes to the original size n location as be4 i loaded any image?
cla(handles.im2)
set(handles.im2,'Visible','on');
i tried set(handles.im2,'OuterPosition',[64.16 16.19 104.57 26.35]); set(handles.im2,'Position',[92 20 57 20]);
these but nothing changes.
3 件のコメント
回答 (3 件)
Image Analyst
2011 年 7 月 10 日
Try
cla reset
2 件のコメント
Image Analyst
2012 年 9 月 8 日
Try this:
set(gca, 'units','normalized', 'outerposition',[0.2 0.3 .5 .2]);
Play around with the parameters until you get what you want.
Tom
2012 年 9 月 8 日
編集済み: Tom
2012 年 9 月 8 日
You could store the original axes size somewhere and reinstate that when required. For example, when the GUI loads you could store the position in the axes' user data:
set(ax_handle,'UserData',get(ax_handle,'Position'))
and then apply the axes size each time you clear the image:
set(ax_handle,'Position',get(ax_handle,'UserData'))
Obviously, watch out for units.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!