saving figure with minimal white space without ballooning the size
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Barbara Margolius
el 6 de Oct. de 2025 a las 18:08
Comentada: Barbara Margolius
el 7 de Oct. de 2025 a las 2:10
I saved a file with
set(gca, 'LooseInset', get(gca, 'TightInset'));
set(gcf, 'PaperPositionMode', 'auto');
saveas(gcf, filename, 'epsc');
but it had too much white space. It was 1.2mb in size.
So I saved it with
exportgraphics(gcf, filename, 'ContentType', 'vector', 'Padding', 0);
This resolved the white space issue, but it was 79mb in size.
Is there a way to save the figure without the huge jump in file size? I am trying to save a complex phase portrait. I want to save several of them, so I don't want to have to do the cropping in an external program. Thanks.
2 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Printing and Saving 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!