[Rd] Artefacts in (screen viewed) PDF output
Paul Murrell
p.murrell at auckland.ac.nz
Tue Aug 1 23:01:38 CEST 2006
Hi
Roger Bivand wrote:
> 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.
I have seen this sort of thing happens when viewing PDF or PostScript
onscreen *with antialiasing turned on*. Most viewers allow you to turn
off antialiasing (some even allow you to turn it off just for lines and
images, but not for text). Does that help in your case?
Paul
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-devel
mailing list