Search code examples
rrgbtiffepscmyk

Creating a CMYK figure in EPS or TIFF in R


Good morning

I am using R (with ggplot)

A journal I am submitting to wants graphics files in either TIFF or EPS and using CMYK (not RGB). Searching around, I found that there is colormodel in PDF but not in 'TIFF. Typing ?eps found nothing, and ??eps led me topostscriptwhich does havecolormodel` but produces .ps files. Are these the same as .eps files?

What should I substitute for my current code which is

jpeg(file = 'c:\\PATH\\FILE.jpg')
   plotname
dev.off()

TIA


Solution

  • eps is an encapsuled postscript document (see here). The most important difference that an eps image contains a BoundingBox.

    You can save an eps file using postscript:

    postscript('file.eps', colormodel="cmyk")
    plot(1:10, 1:10)
    dev.off()
    

    Does that help?