[R] Lattice: how to have multiple wireframe nice intersection?

Guillaume Chapron carnivorescience at gmail.com
Fri Jan 16 15:43:30 CET 2009


Hello,

This code builds a simple example of 2 wireframes :

require(lattice)
x <- c(1:10)
y <- c(1:10)
g <- expand.grid(x = 1:10, y = 1:10, gr = 1:2)
g$z <- c(as.vector(outer(x,y,"*")), rep(50,100))
wireframe(z ~ x * y, data = g, groups = gr, scales = list(arrows =  
FALSE))

However, the intersection between the wireframes is not properly  
drawn. Is there a way to fix this with lattice, or should I use   
another package more suitable for this?

Thanks!

Guillaume




More information about the R-help mailing list