[Rd] Artefacts in (screen viewed) PDF output

Roger Bivand Roger.Bivand at nhh.no
Tue Aug 1 21:55:19 CEST 2006


This issue is probably to do with on-screen viewing of PDF files written
from R (2.3.1, Windows XP, RHEL 4), not with how the files are produced.  
So the question is mainly to ask whether others have seen similar
behaviour, and whether a remedy is known.

When neighbouring polygons are written with the same fill colour, and with
no border line colouring, PDF files show traces of probably unstroked
"lines" or probably interstices when viewed on-screen in at least acroread
(7.0) on both Windows XP and RHEL 4 (though not xpdf 3.0 on RHEL 4). This
is intrusive when many neighbouring polygons share fill colour, for
example on election party share maps, where borders are suppressed for
clarity. An example is:

library(maps)
us <- map("state", fill=TRUE, plot=FALSE)
pdf("borders.pdf")
plot(us, type="n", axes=FALSE, asp=1)
polygon(us, col="blue", border=NA)
dev.off()

Using polygon(us, col="blue", border="transparent") gives the same result. 
Curiously, the same is also observed with postscript() and external 
conversion to PDF (epstopdf), although viewing the EPS file on RHEL 4 in 
ggv does not show any artefacts up to 400%.

My feeling is that the output files are correct but that acroread is 
introducing interstices in rendering to screen - I do not have a printer 
with high enough resolution to check properly, but I believe that 
acroread-printed output does not have the artefacts. They are however 
visible when acroread is used in presentation mode.

Any insight would be very useful.

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-devel mailing list