Effacer les filtres
Effacer les filtres

How to save figure as appears on the screen? with the same aspect ratio, and font size, etc. ?

5 vues (au cours des 30 derniers jours)
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.

Réponses (2)

Image Analyst
Image Analyst le 3 Juin 2016

thomas weldon
thomas weldon le 21 Juin 2018
Modifié(e) : Walter Roberson le 25 Juin 2018
Try this:
fig=gcf;ax=fig.CurrentAxes;fig.Color='w';fig.OuterPosition=fig.InnerPosition;

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by