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!