I want some high-quality 2D graphics produced by Mathematica in my paper.

My step-by-step operation as follows:

First I make the plot, for example,

Plot[x^3 + 2 x + 3, {x, -2, 3}]

Then I

  1. click the right mouse button
  2. copy the figure
  3. paste in my Word document

However, I discover that Word renders my graphic jaggedly.

So my question is: how can I extract a graphic from my notebook and transfer it to Word preserving full Mathematica quality?

enter image description here

  • 1
    $\begingroup$ Works fine under OSX10.9.4, MaMaV10 and Word2011V14.4.3. Try ctrl v or/and Paste as "Picture" or Paste as "PDF". Same behavior? Then check this link. Alternatively you can use "Save Selection As" and choose an appropriate format for exporting/importing. $\endgroup$ – user9660 Jul 13 '14 at 3:42
  • 1
    $\begingroup$ select the graphics, go to file>save selection as. Change Files of type from PDF to any image format (I suggest PNG for better resolution) and save the picture. Now import (copy the picture file and paste in word), and I hope you will get a better resolution. $\endgroup$ – Sumit Jul 13 '14 at 10:51
  • 2
    $\begingroup$ Here's a thread with a similar issue: mathematica.stackexchange.com/questions/43378/… $\endgroup$ – Gregory Rut Jul 13 '14 at 15:39
  • $\begingroup$ I'm going to second the suggestion of saving as PNG. There are many other ways to do it, but that's pretty straightforward and works fairly well. I believe if you copy-paste into word, it rasterizes the image poorly. $\endgroup$ – Kellen Myers Sep 30 '14 at 9:24
  • 3
    $\begingroup$ I tagged this with windows because the solutions are OS specific and the OP seems to use Windows. On Windows Mathematica uses the EMF format for copying vector graphics to the clipboard. On OS X it uses PDF. There's a very significant difference in quality. $\endgroup$ – Szabolcs Apr 15 '15 at 16:43

If you need to achieve the best possible quality I strongly recommend against using the Clipboard for transferring graphics. Under Windows the clipboard will contain a Windows Metafile generated with display resolution fidelity! This is the reason why you see jaggies.

The same is true for the vector graphics files generated by Mathematica's Save Selection As... menu item. For achieving the best possible quality always use the Export command.

Instead of copying I recommend to Export your graphics as EPS and then import it in your Word document. Note that most scientific journals recommend to provide graphics in the resolution-independent EPS format.

One possible difficulty with EPS is that it does not support semi-transparency. If your graph contains transparent objects you cannot directly Export it as correct EPS file from Mathematica.

Another problem is that MS Office supports EPS only up to PostScript level 2 while Export "generally creates PostScript level 2 files, and includes certain level 3 features if appropriate." MS Office fails to import EPS file when it contains PostScript level 3 features and unfortunately it is currently impossible to restrict Export for writing only level 2 files.

I expand these topics and provide workarounds in these answers:

If you are not satisfied with EPS, I recommend you to Export your graphics as EMF. EMF has an advantage of being the native vector graphics format on Windows but unlike EPS and PDF it does not support font embedding. EMF files Exported from Mathematica also have much lesser vector precision than EPS, PDF and SVG files generated by Export. So EPS is much more advanced as compared to EMF but also is much more difficult to deal with because MS Office support of this format is rudimentary.

If you use VertexColors in your graph (which PDF format supports but Mathematica's Export still does not) or there are other reasons why EPS, EMF and PDF give unsatisfactory results you may consider rasterizing your graph and Exporting it as PNG with high resolution. This is not always an easy task because Mathematica's Graphics by default is NOT resolution-independent: Ticks and TickLabels by default do not scale with the whole Graphics! It is huge headache for any Mathematica user for many years and there is still no easy workaround. In the most cases the best way is to Export as PDF from Mathematica and then export the graph from your favorite PDF renderer to PNG. Other workarounds include some preprocessing inside of Mathematica and/or using third-party software.

Here is an example of the preprocessing approach which gives small file size without loss of quality:

| improve this answer | |
  • $\begingroup$ @AlexeyPopkov, transparent means Opacity less than 1? $\endgroup$ – alancalvitti Oct 5 '14 at 17:38
  • $\begingroup$ @alancalvitti Yes, between 0 and 1. When Opacity is 1 or 0 it is treated in a special way AFAIK. $\endgroup$ – Alexey Popkov Oct 6 '14 at 0:27

Use Bitmap to save. Also PlotStyle-> {Red,Thick} for thicker plot lines.

JaggedLine However am still unable to explain why the thin red line and thicker one are jagged ( display different thicknesses) above y = 22.

| improve this answer | |
  • $\begingroup$ Hi ! Can you elaborate a bit ? $\endgroup$ – Sektor Sep 29 '14 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy