2
$\begingroup$

I have a function that creates a 2D line with filling to the axis. When I copy this graphic into MS Word it is very fuzzy, so much so that the numbers and text are almost unreadable, not to mention the aesthetic problem.

When I take away the filling, the graphic can be copy and pasted into word as normal.

the code used is:

Show[
  Plot[d[x], {x, 0, 5}, PlotRange -> {-0.003, 0.003}], 
  ListLinePlot[residualsdata, PlotStyle -> Black, Filling -> Axis, 
    FillingStyle -> Directive[Opacity[0.5], Green]]]

The graphic without the filling is gotten by:

Show[
  Plot[d[x], {x, 0, 5}, PlotRange -> {-0.003, 0.003}], 
  ListLinePlot[residualsdata, PlotStyle -> Black]]

Does anybody know the cause of this problem and/or how to fix it?

$\endgroup$
5
  • 1
    $\begingroup$ Is this Word 2010? You might need to convert the picture to a drawing object - right click on the fuzzy picture, select Edit Picture, then Yes. $\endgroup$ Mar 6, 2013 at 11:56
  • $\begingroup$ It would also help if we knew what d[x] was. $\endgroup$
    – m_goldberg
    Mar 6, 2013 at 13:15
  • 6
    $\begingroup$ The most likely cause is that the default copy format (EMF?) doesn't support transparency and therefore as soon as you add the filling, Mathematica will copy in a different format (likely bitmap). You ca experiment with Edit -> Copy As ad choose different formats and see which one gives good results. However, for the best possible result in Word, I'd recommend exporting to PNG using the Export command and a high ImageResoltuion setting. $\endgroup$
    – Szabolcs
    Mar 6, 2013 at 13:19
  • $\begingroup$ Well, for LaTeX PDF/EPS are likely yo give better quality ... except for 3D graphics. $\endgroup$
    – Szabolcs
    Mar 6, 2013 at 16:42
  • $\begingroup$ Related MathGroups thread: "Mathematica 8 Windows EMF/WMF export with transparent background?" $\endgroup$ Jan 10, 2014 at 2:33

3 Answers 3

3
$\begingroup$

The most likely cause is that the default copy format (EMF?) doesn't support transparency and therefore as soon as you add the filling, Mathematica will copy in a different format (likely bitmap). You ca experiment with Edit -> Copy As and choose different formats and see which one gives good results. However, for the best possible result in Word, I'd recommend exporting to PNG using the Export command and a high ImageResolution setting.

$\endgroup$
1
$\begingroup$

An alternative to rasterization suggested by Szabolcs is to insert in the Word document not a metafile (which you do by default by selecting graphics in the FrontEnd, copying and pasting it in MS Word) but an EPS vector image with flattened vector transparency and Mathematica fonts embedded in it (it has additional advantage of independence from Mathematica fonts). It is slightly more difficult because Mathematica's EPS export is rudimentary and you will need to Export your graphics to PDF first, then use Adobe software to flatten transparency and create EPS level 2 file from the exported PDF. But it is worth the effort because this way allows you to achieve the best possible vector quality for printing purposes. Here I discuss how to do it using Adobe Illustrator or Adobe Acrobat and this answer contains additional explanations.

$\endgroup$
0
$\begingroup$

I've similarly wrestled with this problem for years. I'm not sure how to fix it in general, but one possible culprit for you is Opacity. For me the plot here (not the most simple example)

ListPlot[
    {{0, 4.5}, {40, 4.5}},
    PlotStyle -> {Lighter[Purple], Opacity[0.5]}, Joined -> True,
    Frame -> True, FrameLabel -> {"Endurance (min)", "Payload (kg)"}
]

is blurry when I print it or otherwise save it as a .pdf file. However, if you remove the Opacity[0.5] it is crisp.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.