Skip to content
Prev 3529 / 63424 Next

followup to graphics bug #414

I haven't been able to compile the development version on my machine yet
(problems with BLAS includes, I don't have time to dig into it right now),
so I'm curious: does this fix also solve the problem recently reported by
Robert Sandefur recently on R-help, where he got different results from
abline() on the X11 and Postscript drivers?  I can replicate his problem
(and perhaps shed some light on it) with the following code--

==========================

tmpf0 <- function(col=1:3,...) {
  p <- matrix(c(3.9,0.2,3.9,0.25,3.9,1.0),byrow=TRUE,ncol=2)
  abline(coef=p[1,],col=col[1],...)
  abline(coef=p[2,],col=col[2],...)
  abline(coef=p[3,],col=col[3],...)
}

tmpf0(3:4)
tmpf0(1:2,p1=c(3.9,0.2),p2=c(3.9,0.25))
tmpf0(1:2,p1=c(3.9,0.2),p2=c(3.9,0.25))

tmpf <- function() {
  plot(1:10,1:10,xlim=c(-3,3),ylim=c(2000,1000000),log="y")
  par(xpd=TRUE)
  tmpf0(lty=1)
  par(xpd=FALSE)
  tmpf0(lty=2)
  par(xpd=NA)
  tmpf0(lty=3)
}

x11()
tmpf()
postscript(file="tmp.ps")
tmpf()
dev.off()
========================

I set this up so that one line (red) would clip at the bottom only, one
line (green) would clip at the bottom and the top, and one line (black)
wouldn't need clipping at all. In R 1.0.0 everything works fine under the
X11 driver but under the Postscript driver, both of the clipped lines are
wrong, but are different depending on how the clipping parameter is set.

  I haven't yet been able to track the source of this down, but I hope
that this information helps if someone gets to it before I do.  If the
recent fix also fixes this bug, that would be very nice.

  Ben Bolker
On Mon, 20 Mar 2000, Paul Murrell wrote: