MATLAB Answers

0

Insert vector graphic from Matlab to Word

Asked by Rafael Kübler on 19 Oct 2016
Latest activity Commented on by Erik Petrini on 29 Mar 2018
Accepted Answer by Jan
Hello together,
i know its a often discussed topic. But i haven't found any solution for me. I have some plots, which i need to import in Word 2013 afterwards the docx is saved as pdf.
The problem is:
If the plot gets saved (with the function print() ) as .eps or emf and imported in Word, the downsampled placeholder of the graphics look pretty poor and the graphics in pdf are no vector grapic anymore. They do get turned into a bitmap and by zooming in a bit, one can see the pixels. If i use Edit -> Copy Figure in the Matlab figure and paste it in Word, i get a nice graphic in Word as well as a nice vector based graphic in the pdf file.
Is there a way, to save a figure to a file and import it to Word and have the same quality like i have by copy and paste? What is the difference between these methods?
Thank you for your help.
Rafael

  0 Comments

Sign in to comment.

1 Answer

Answer by Jan
on 19 Oct 2016
 Accepted Answer

Export the graphics using print to EPS creates pixel images, when the OpenGL renderer is active. So try to enable 'Painters' manually bevor printing:
set(FigureH, 'Renderer', 'painters');
Even then the pixel preview of the vector file is displayed in Word, but only on the monitor. When exported to a PDF the vector graphics are embedded.

  3 Comments

Great that works. The renderer was set to 'zbuffer'. Now it looks fine. Is there a common value, how high i can set the resolution?
Thank you for your help Jan Simon
Jan
on 19 Oct 2016
300 or 600 dpi produce nice previews also.
I would really need a working solution for Simulink system plots. The following snags are plaguing me:
You cannot save Simulink block diagrams in PostScript or EPS formats.
SVG format corrupts the font and is not recognized by word 2010 which is the version available to me in my organization.
PDF format import in words always corrupts the final text annotation of any system export (it is not imported as part of picture but rather as malformed text in the end).
EMF is not available since our organization runs Matlab (2016b) on CentOS.
Out of options for vector graphics (?)
If at least there was some way to get PDF export/import to work bug-free that would be a viable way forward.

Sign in to comment.