[R-sig-eco] Publication quality graphics in R

tyler tyler.smith at mail.mcgill.ca
Sat May 31 03:15:49 CEST 2008


"Mark A. Albins"
<albinsm at science.oregonstate.edu> writes:

>
> "Plots in R come out so nicely, publication quality if you specify  them correctly."
>
> In particular, I'd like to hear from the list, how folks specify and  export presentation
> quality and publication quality graphics with R.  

A simple way to get consistent results is to open the graphics window
with explicit dimensions, create your figure, and then copy the window
to eps:

X11(width = 2, height = 3) ## final print size will be 2" by 3"
plot(Y ~ X)
points ...

dev.copy2eps(file="...")

This way you see everything you've done, and you save copy to file in a
format that preserves all the detail. Never resize the figure by
dragging the corners at any point in processing, or you'll distort all
the proportions. This is really important if you're working with
ordinations of any kind, where the distances between points is key.

It's important to understand the differences between the different
formats. eps, ps, pdf, and wmf are all vector formats. That means they
can be reproduced with arbitrarily high or low resolution, so long as
the printer can read them properly, while remaining relatively small
files. jpg, png, tiff, bmp are all raster formats. That means they are
limited to the resolution they are created at, and if they were created
at high resolution they will be very large files.

If the printer can't deal with your eps, which is a problem I ran into,
you can convert it into a suitably high-res tiff with image editing
software like the GIMP. If you have a low-res jpg (which will look
pixelated), you can't fix it, you have to re-make it at higher res, or
in another format. Of course, you can generate high-res tiff or jpg
files to begin with, but they can be cumbersomely large to email around.

my 2 cents!

Tyler

-- 
Tired of spyware? Try Firefox:

www.firefox.com



More information about the R-sig-ecology mailing list