[Rd] lty parameter not respected by pdf device
baptiste auguie
baptiste.auguie at googlemail.com
Tue Dec 8 23:07:44 CET 2009
Dear all,
Several of us ggplot2 users noticed the disappearance of some dashed
lines in the pdf output produced with the pdf device. They looked fine
on screen or with quartz() output. When opening the file with
Illustrator I noted that the missing line was in fact present, but
with a dashed pattern that contained zero solid length. It appears
that if you specify lty in the form lty=xy, pdf() produces a line with
lty=(x-1)(y+1) and some lines may disappear. Here is a minimal
example,
pdf("test.pdf")
grid.polyline(gp=gpar(lty="13"))#, lineend = "butt"))
dev.off()
The line is invisible, and has pattern (according to Illustrator) lty=04.
Similarly,
pdf("test.pdf")
grid.polyline(gp=gpar(lty="5555"))#, lineend = "butt"))
dev.off()
produces a visible line with pattern lty=4646
Best regards,
baptiste
sessionInfo()
R version 2.11.0 Under development (unstable) (2009-11-30 r50622)
i386-apple-darwin9.8.0
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] ggplot2_0.8.3 reshape_0.8.3 plyr_0.1.9 proto_0.3-8
loaded via a namespace (and not attached):
[1] tools_2.11.0
More information about the R-devel
mailing list