The best way to add MATLAB/Simulink plots/figures to a Latex document

23 次查看(过去 30 天)
Hello everyone
What is the best way to add MATLAB/Simulink plots/figures to a Latex document?
I prefer to keep figures high quality vector graphics.

回答(1 个)

Bruno Luong
Bruno Luong 2020-11-16
I don't know is it's the best but I export to EPS
set(fig,'renderer','Painters');
print(fig, 'figurexxx.eps','-depsc2');
Then use EPS2PDF to convert to PDF, then include in LaTeX document.
  2 个评论
Ameer Hamza
Ameer Hamza 2020-11-16
编辑:Ameer Hamza 2020-11-16
Even better is to use psfrag with eps files to make in place text replacements using the latex commands.
Bruno Luong
Bruno Luong 2020-11-16
编辑:Bruno Luong 2020-11-16
Good to know. I might try psfrag the next time I write a report.
EDIT: just make a quicktest and pdf2eps produces a better/sharper graph than psfrag. (The output file is also larger).

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by