How can I produce Matlab Figure with lower memory size?

6 ビュー (過去 30 日間)
Reza Yasemi
Reza Yasemi 2017 年 9 月 30 日
編集済み: per isakson 2017 年 10 月 1 日
Hello all, I produced a 3 GB data file which gives me plots for some variables of interest. When I save the generated plot, it takes 200 MB, I need it to be saved in much lower size. Does anyone have a solution? I am an amateur matlab user by the way. Thanks.
  3 件のコメント
Reza Yasemi
Reza Yasemi 2017 年 9 月 30 日
when I save it in png format it is okay, around 1 MB. but when saved in .fig format, it takes 206 MB. I need to share it in editable format for other colleagues.
Walter Roberson
Walter Roberson 2017 年 9 月 30 日
If your colleagues are all using R2014b or later, then use savefig() with the 'compact' option.

サインインしてコメントする。

回答 (1 件)

per isakson
per isakson 2017 年 10 月 1 日
編集済み: per isakson 2017 年 10 月 1 日
I made a little test
>> plot( randn(1,100) )
>> savefig(gcf,'c:\tmp\savefig')
>> print( 'c:\tmp\dsvg', '-dsvg' )
>> print( 'c:\tmp\dpsc2', '-dpsc2' )
>> print( 'c:\tmp\dpng', '-dpng' )
with a simple line plot. The savefig, -dps2 and -dsvg files were all approx. 50% larger than the -dpng file.
"editable format for other colleagues" they are all "editable" with appropriate tools. To edit with Matlab chose savefig. Any(?) browser may be used to view the svg file.

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by