[R-sig-Geo] Error in execution of lattice code

Waichler, Scott R Scott.Waichler at pnl.gov
Wed Nov 26 01:23:43 CET 2008


The following code runs fine on Linux, but not on my Mac.  The error
message is given below, after the levelplot() call.  I was able to run
lattice functions previously on the Mac without any problems.  The only
change I'm aware of is that my Mac was recently worked on by a system
administrator to implement some system and security changes.  I don't
know how that would be related to this problem.  I searched R-help and
found a similar problem that wasn't answered.

> sessionInfo()
R version 2.8.0 (2008-10-20)
powerpc-apple-darwin8.11.1

locale:
C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.8.0

library(lattice)
# code from help(levelplot)
x <- seq(pi/4, 5 * pi, length = 100)
y <- seq(pi/4, 5 * pi, length = 100)
r <- as.vector(sqrt(outer(x^2, y^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- cos(r^2) * exp(-r/(pi^3))
png(file = "junk.png", width=8.5, height=11, units="in", res=75,
pointsize=12)  # letter
levelplot(z~x*y, grid, cuts = 50, scales=list(log="e"), xlab="",
         ylab="", main="Weird Function", sub="with log scales",
         colorkey = FALSE, region = TRUE)

Error in grid.Call("L_textBounds", as.graphicsAnnot(x$label), x$x, x$y,
:
  Polygon edge not found
In addition: Warning message:
In grid.Call("L_textBounds", as.graphicsAnnot(x$label), x$x, x$y,  :
  no font could be found for family "Arial"

dev.off()

Thanks for any help you can provide,

Scott Waichler
Pacific Northwest National Laboratory
scott.waichler at pnl.gov




More information about the R-sig-Geo mailing list