From baptiste.auguie at googlemail.com  Tue Dec  8 23:07:44 2009
From: baptiste.auguie at googlemail.com (baptiste auguie)
Date: Tue, 8 Dec 2009 23:07:44 +0100
Subject: [Rd] lty parameter not respected by pdf device
Message-ID: <de4e29f50912081407v15853b57u269f8e6b7d6b57bd@mail.gmail.com>

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



[Rd] lty parameter not respected by pdf device
baptiste auguie