How to export high quality plot in eps format ?

조회 수: 430 (최근 30일)
andrea
andrea 2020년 6월 23일
답변: Jesús Gutiérrez 2020년 6월 24일
I have a problem with the quality of some plots I'm saving in eps format to insert it in a .tex file, the command i use to save the plots is :
f = gcf ;
f.Renderer = 'painters'
ax.FontSize = 25 ;
ax.FontWeight = 'bold'
grid on
f.WindowState = 'maximized'
saveas(f,'image_name','epsc');
Then the eps image is imported into latex, but the the plots in the pdf produced are somehow distorted they only became better if i zoom in , I attached a pdf to show the problem. Maybe should I use another format ? or is the above command wrong ?
  댓글 수: 2
jessupj
jessupj 2020년 6월 24일
looks right to me. however, i really advise checking out export fig. it has support for pdf,eps output.
darova
darova 2020년 6월 24일
try print

댓글을 달려면 로그인하십시오.

답변 (1개)

Jesús Gutiérrez
Jesús Gutiérrez 2020년 6월 24일
I use these lines to get high quality eps and import it to LaTex documents:
set(gcf,'units','centimeters','position',[xini,yini,xsize,ysize]);
set(gca,'FontSize',10,'FontName','Times');
print("title",'-depsc2');
First line configures figure size, I use to adjust it to the line width of the report I am creating, in order to maintain fontsize when figure is imported. (You can leave xini and yini to zero)
Second line sets fontsize and font type (use listfonts to know each font code installed in your computer).
Third line finally creates a coloured .eps file.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by