I am trying to save some graphs using R for publication. I want to have them compressed with lzw and have the resolution at 300. For some reason it won't allow me to do this. In fact, it seems like R is ignoring some of the variables I set.
For the code example,
tiff(file="file.tiff",
width=6.83, height=6.83, units="in",
pointsize="12", compression = "lzw",
bg="white", res=300, antialias = "none" )
outputs an uncompressed file of size 28 x 28 inches and a resolution of 72 ppi.
A reproducable example would be
hist(rnorm(1000))
dev.off()
Here is the output of ImageMagick for file.tiff
Image: file.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 2049x2049+0+0
Units: PixelsPerInch
Type: PaletteAlpha
Base type: TrueColor
Endianess: MSB
Colorspace: sRGB
...
Compression: None
...
Filesize: 16.8MB
I tested this on another Apple running 10.7 and get the same results. As can be seen, even when using the options to compress and set the resolution at 300 dpi, the output does not follow the options.