How to save figure as appears on the screen? with the same aspect ratio, and font size, etc. ?
5 ビュー (過去 30 日間)
古いコメントを表示
figure('units','normalized','outerposition',[0 0 .5 1]);
hist(rand(100));
saveas(gcf,sprintf('%s.png',mfilename));
For example in this case the output png is not a portrait format, however the figure window is.
0 件のコメント
回答 (2 件)
thomas weldon
2018 年 6 月 21 日
編集済み: Walter Roberson
2018 年 6 月 25 日
Try this:
fig=gcf;ax=fig.CurrentAxes;fig.Color='w';fig.OuterPosition=fig.InnerPosition;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!