[Rd] lty parameter not respected by pdf device

From: baptiste auguie <baptiste.auguie_at_googlemail.com>
Date: Tue, 08 Dec 2009 23:07:44 +0100


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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 08 Dec 2009 - 22:11:32 GMT

This archive was generated by hypermail 2.2.0 : Wed 09 Dec 2009 - 02:01:04 GMT