How to save a GUI figure in matlab
50 ビュー (過去 30 日間)
古いコメントを表示
Like this picture I wanted to save my GUI figure. But I dont know how to do that
0 件のコメント
回答 (3 件)
Murugan C
2019 年 6 月 26 日
If you press Save Fig button in gui, below code gcf will capture your window and save in bmp format into your current directory.
saveas(gcf,'output','bmp')
Fig- output.bmp
1 件のコメント
Robert
2019 年 12 月 2 日
Hi,
thanks to this example, which solved my problem first. Nevertheless I would like to save a gui window in png or jpg-format, because the size of bmp ist pretty big. If I choose jpg or png, only a small part of the figure is saved. Do you know a solution for this?
Kind regards
Robert
Himanshu Rai
2019 年 6 月 24 日
編集済み: Himanshu Rai
2019 年 6 月 24 日
Have you tried export_fig() - https://in.mathworks.com/matlabcentral/fileexchange/23629-export_fig
0 件のコメント
Yash Totla
2019 年 6 月 24 日
% ...
h = figure;
plot(X, y, '-bs', 'Linewidth', 1.4, 'Markersize', 10);
% ...
saveas(h,name,'fig')
saveas(h,name,'jpg')
This way, the figure is plotted, and automatically saved to the desired file format.
Alternatively you can wait for the plot to appear and click 'save as' in the menu.
1 件のコメント
Rik
2019 年 6 月 24 日
Since the menu is generally disabled in a GUI, that option is probably not available.
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!