[R] Creating publication-quality plots for use in Microsoft Word

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Sep 16 09:22:42 CEST 2010


On Wed, 2010-09-15 at 08:25 -0700, dadrivr wrote:
> Thanks for your help, guys.  I'm looking to produce a high-quality plot (no
> jagged lines or other distortions) with a filetype that is accepted by
> Microsoft Word on a PC and that most journals will accept.  That's why I'd
> prefer to stick with JPEG, TIFF, PNG, or the like.  I'm not sure EPS would
> fly.

>From my experience, most (all of the ones I have personal experience
with) of the large publishers of scientific journals accept EPS as a
file format. I have used it [EPS] routinely for providing figures to
Windows-bound colleagues to insert into Word.

EPS is perfectly acceptable in Word on a PC. The only proviso is that,
as has been mentioned, Word will only *display* a low resolution bitmap
"preview" of EPS image *in* the document on screen whilst editing. When
printed to a postscript printer or converted to PDF via something like
Distiller or via publishers' online submission tools, the figure will be
in the best possible quality.

TIFF is the only bitmap format I am aware of that journals routinely
accept.

So, IMHO, EPS or TIFF are the only two viable options if you factor in
wide journal acceptance.

> I tried inserting the PDF directly into Word, but I am on a PC and there is
> a loss of quality in the transfer.  I'm not sure I know how to use the
> approach that Marc suggested in reference to saving a new PDF for use in
> Word.

I haven't used the recent version of Word, but PDF was not accepted as
an "picture" format, on a PC (Macs may be different).

> I also tried Gabor's suggestion to save in Microsoft's metafile format
> (savePlot with type = wmf and emf), but the images contain lines that are as
> jagged as those created from the regular R plot output.

On screen or when printed? I wouldn't expect them to be jagged when
printed for the same reasons as EPS; they are a vector format.

> Is there a way to enable anti-aliasing on all regular R plot output to clean
> up the jaggies and then save it in another format?  Or should I try
> something else?  Thanks again!

Use EPS, or as Thomas Lumley (IIRC) suggested, a high resolution (300dpi
or greater) TIFF.

Also, make sure you are plotting on the device directly, e.g.

postscript(....)
plot(....)
dev.off()

rather than use the menu options to save plots/copy to clipboard
features in the windows version of R. I've not used that version for
some time, but you get far more control over the parameters of the
produced plot (height, width, paper etc) by plotting directly on the
device.

HTH

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list