Skip to content
Prev 169 / 7420 Next

Publication quality graphics in R

Hi Mark,

as previous people have stated ps and png are good options.  Another  
option is the tiff format.  In the past you had to install the Cairo  
package and use function Cairo().  As of R 2.7.0 there is now the  
function tiff() to create tiffs, it looks like the Cairo functions  
have become part of R.  Either way you need to install Cairo  
separately outside of R.  Also expect to get some interesting  
formatting issues when you create high res (300 dpi) graphics (e.g.,  
you need to scale text including axes appropriately, see: ?par).  A  
nice feature is that you can specify the graphic size in inches so use  
~7 in wide for full page or ~3.5 in wide for single column (check your  
journal's style guide).  Note that there will be some interesting  
artifacts due to your screen probably being 72 dpi, print out a copy  
before you submit it to make sure the print version looks like what  
you want (a 300 dpi image looks huge on my monitor).

I've been putting R graphics on my website to keep my committee  
informed.  If you'd like to see some examples see (everything except  
the map on the webpage is R output):

http://oregonstate.edu/~knausb/pubs/asle_aflp/asle_aflp.html

The downside of tiff is that they're big, the good side is that you  
can edit the tiff in your favorite graphics package (e.g., the GIMP).

Enjoy!