[Rd] incorrect linetype with pdf device (PR#14128)

From: <baptiste.auguie_at_gmail.com>
Date: Fri, 11 Dec 2009 15:15:13 +0100 (CET)


Full_Name: baptiste auguié
Version: 2.10.1 RC (2009-12-06 r50690)
OS: Mac OSX 10.5
Submission from: (NULL) (90.25.215.172)

The following code, run with a vanilla R session, produces different visual output for the two devices,

library(grid)

pdf("test-pdf.pdf")
grid.newpage()
grid.lines(gp=gpar(lty="13", lineend = "butt")) dev.off()

png("test-png.png")
grid.newpage()
grid.lines(gp=gpar(lty="13", lineend = "butt")) dev.off()

The pdf output, opened with Acrobat, shows only extremely thin marks (artifacts) at low zoom factor, and invisible line at higher zoom factor. The same file opened with Adobe Illustrator reveals that the line pattern lty=13 has in fact become 04 (0 solid length, 4 space). Similarly, lty=123456 would produce 032547,

pdf("test-123456.pdf")
grid.newpage()
grid.lines(gp=gpar(lty="123456", lineend = "butt")) dev.off()

while the same command with quartz() gives the correct line pattern,

quartz(type="pdf", file="test2-123456.pdf") grid.newpage()
grid.lines(gp=gpar(lty="123456", lineend = "butt")) dev.off()

The same behavior is observed with R 2.11.0 (2009-12-09 r50690)

sessionInfo()
R version 2.10.1 RC (2009-12-06 r50690) 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



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

This archive was generated by hypermail 2.2.0 : Thu 17 Dec 2009 - 14:11:10 GMT