[R] image() generates many border lines in pdf, not on screen (quartz) - R 2.9.1 GUI 1.28 Tiger build 32-bit (5444) - OS X 10.5.8

Andreas Fischlin andreas.fischlin at env.ethz.ch
Mon Aug 17 13:32:16 CEST 2009

Dear all,

I have invested substantial amount of work in a complicated, yet on 
screen perfect looking graph that uses image(). Unfortunately saving it 
as pdf (or quartz.save at high resolution) all generate very disturbing 
border lines around each small rectangle that image() has drawn. While 
using Preview it helps to turn off antialiasing to make those faint 
lines disappear on screen 
However, they are far from faint on pdf (Adobe Reader v9.1.3, regardless 
of settings) or any other high resolution rendering (printer) and do not 
disappear, whatever I do. What I encounter is also in quite sharp 
contrast with all I read on this issue, including R mailing lists (e.g. 
http://finzi.psych.upenn.edu/R/Rhelp02/archive/30588.html), e.g. if 
someone claims those lines would not matter and go away when printing. 
In my case they don't.

BTW, my image() statement looks like this:

image(rfc, y, -t(zVals), zlim=c(-noCols-0.5,0.5), col = 
heat.colors(noCols), axes=F, add=T)

where z is a 127 x 3 matrix.

Since I need high resolution variants for final publication I need to 
know whether it is possible to force image() to give up drawing these 
borders (I tried already several low level par parameters, all to no 
avail). On screen everything looks perfect, pdf, clipboard, quartz.save, 
save all look bad up to inacceptibly bad, especially pdf and any printing!

Reading all what I could find on this topic, I fear there might even a 
bug be present in R (R 2.9.1 GUI 1.28 Tiger build 32-bit (5444)). Can 
anyone offer some insight or even help?


ETH Zurich
Prof. Dr. Andreas Fischlin
Systems Ecology - Institute of Integrative Biology
CHN E 21.1
Universitaetstrasse 16
8092 Zurich

andreas.fischlin at env.ethz.ch

+41 44 633-6090 phone
+41 44 633-1136 fax

Make it as simple as possible, but distrust it!
* *

More information about the R-help mailing list