On Wed, 2 Aug 2006, Paul Murrell wrote:
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?
Sorry for the delay in replying. On both Windows XP/Acroread 7.0 and RHEL
4/Acroread 7.0, Edit - Preferences - Page Display - Smooth line art
(off) removes the artefact. On a number of printers printing from Acroread
7.0, the artefact is not present. Acroread has on/off ticks for smooth
text, smooth line art, and smooth images, where the smooth line art tick
is the one that is being over-enthusiastic in this case.
Thanks,
Roger.
Paul
--
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: [EMAIL PROTECTED]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel