Effacer les filtres
Effacer les filtres

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

15 vues (au cours des 30 derniers jours)
Nima Mathwork
Nima Mathwork le 16 Nov 2020
Modifié(e) : Bruno Luong le 16 Nov 2020
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.

Réponses (1)

Bruno Luong
Bruno Luong le 16 Nov 2020
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 commentaires
Ameer Hamza
Ameer Hamza le 16 Nov 2020
Modifié(e) : Ameer Hamza le 16 Nov 2020
Even better is to use psfrag with eps files to make in place text replacements using the latex commands.
Bruno Luong
Bruno Luong le 16 Nov 2020
Modifié(e) : Bruno Luong le 16 Nov 2020
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).

Connectez-vous pour commenter.

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by