Print figures as eps -> wrong resolution

10 ビュー (過去 30 日間)
Johannes Lange
Johannes Lange 2015 年 11 月 8 日
コメント済み: Johannes Lange 2015 年 11 月 9 日
Hello together,
i need to save a lot of figures as .eps files to use in Latex. Since they should not be scaled in Latex (fonts get too small and so on), I want to save the figures in the right size directly in Matlab. When I open a figure and click on 'Save as', everything is fine. Now I don't want to do this for each figure separately wherefore I wrote a simple skript that loads the .fig and saves it as an .eps.
filename = get(gcf, 'FileName');
print(gcf, '-depsc2', '-loose', filename(1:end-4))
The problem is now that the image becomes about 3 times as big and I don't know why. I tried to play with the resolution by using
'-r300' or
'-r0'
but I could not manage to save the figure in the same size I see it in Matlab. Does anybody know an answer?
Greetings, Johannes
  2 件のコメント
Jan
Jan 2015 年 11 月 8 日
Are you using the Painters renderer and create a vector EPS file, or the OpenGL renderer and a bitmap EPS?
Johannes Lange
Johannes Lange 2015 年 11 月 9 日
Where do I set this option?

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

採用された回答

Jan
Jan 2015 年 11 月 8 日
Use the 'PaperPosition' of the figure instead of the -r argument of print to set the size of the created EPS file. The -r argument influences the resolution of the embedded TIFF preview for EPS files.
  1 件のコメント
Johannes Lange
Johannes Lange 2015 年 11 月 9 日
that solved it, have great thank!

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

その他の回答 (0 件)

カテゴリ

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