How to save figure as appears on the screen? with the same aspect ratio, and font size, etc. ?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
thomas weldon
el 21 de Jun. de 2018
Editada: Walter Roberson
el 25 de Jun. de 2018
Try this:
fig=gcf;ax=fig.CurrentAxes;fig.Color='w';fig.OuterPosition=fig.InnerPosition;
0 comentarios
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!