Saving plot to tiff, with high resolution for publication (in R)

Tal Galili picture Tal Galili · Aug 29, 2010 · Viewed 56.2k times · Source

A journal we are sending an article to is asking for the following:

To ensure the best reproduction quality of your figures we would appreciate high resolution files. All figures should preferably be in TIFF or EPS format... and should have the following resolution:
Graph: 800 - 1200 DPI
Photo: 400 - 800 DPI
Color (only CMYK): 300 - 400 DPI (DPI = dots per inch)

Since I am sending a graph, I am trying to save it using tiff.

Here is the code I am using:

tiff(filename = "c:\\aaa.tiff", 
     res = 800, pointsize = 2)
plot(1:100)
dev.off()    

But sadly, it produces a very "bulky" image - and if I where to not use pointsize = 2, I would get the error message:

Error in plot.new() : figure margins too large

Any suggestions?

Answer

nico picture nico · Aug 29, 2010

One thing you should do is use the compression parameter.

For instance:

tiff("outfile.tif", compression = "lzw")

LZW is a lossless compression format, so you will not lose any data, but you will definitely reduce filesize.