How to save figure as appears on the screen? with the same aspect ratio, and font size, etc. ?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
thomas weldon
am 21 Jun. 2018
Bearbeitet: Walter Roberson
am 25 Jun. 2018
Try this:
fig=gcf;ax=fig.CurrentAxes;fig.Color='w';fig.OuterPosition=fig.InnerPosition;
0 Kommentare
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!