saving figure with minimal white space without ballooning the size

3 次查看(过去 30 天)
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 个评论
Barbara Margolius
Barbara Margolius 2025-10-7
I'm sure you have identified the problem. I adapted some code from file exchange to generate my image and presumably it is raster rather than vector. Thanks.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

产品


版本

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by