[Rd] incorrect linetype with quartz device (PR#14129)

From: <baptiste.auguie_at_gmail.com>
Date: Fri, 11 Dec 2009 15:30:10 +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 quartz() device, either in interactive use or with pdf file output, produces an incorrect dashed line when the data is dense. Consider the following comparison between quartz() and pdf(),

library(grid)

comparison <- function(N=10){   

x = seq(0, 10, length=N)
y = cos(x)

output.quartz <- paste("quartz-", N,".pdf", sep="") output.pdf <- paste("pdf-", N,".pdf", sep="")

pdf(output.pdf, width=4, height=4)
pushViewport(viewport(xscale=c(0, 10), yscale=c(0, 6))) for(ind in 1:5)
grid.lines(x, y+ind, gp=gpar(lty=ind),

           default.units="native")
dev.off()

quartz(type="pdf", file=output.quartz,

       width=4, height=4)
pushViewport(viewport(xscale=c(0, 10), yscale=c(0, 6))) for(ind in 1:5)
grid.lines(x, y+ind, gp=gpar(lty=ind),

           default.units="native")
dev.off()

}

comparison()
## the output is (almost, see PR#14128) identical

comparison(1e4)
## here the quartz output has non-homogeneous spacing
## depending on the slope of the data
## and the aspect ratio of the device

The same behavior is observed with R2.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:58:49 GMT

This archive was generated by hypermail 2.2.0 : Sat 12 Dec 2009 - 02:51:07 GMT