我正在尝试以类似矩阵的方式将条带添加到叠加的线框图中:
library(lattice)
g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2)
cond1 <- c(rep(1,2*dim(g)[1]),rep(2,2*dim(g)[1]))
cond2 <- c(rep(1,dim(g)[1]),rep(2,dim(g)[1]),rep(1,dim(g)[1]),rep(2,dim(g)[1]))
g$z <- log((g$x^g$gr + g$y^2) * g$gr)
g <- cbind(rbind(g,g,g,g),cond1,cond2)
wireframe(z ~ x * y | cond1+cond2, data = g, groups = gr,
scales = list(arrows = FALSE),
strip.left=T,
strip=T,
drape = TRUE, colorkey = F,
screen = list(z = 30, x = -60)
)
问题:有没有办法让 cond1 在左侧条带上,而 cond2 在顶部条带上,并且只在外边框显示一次?(就像一个矩阵)
提前致谢!
约瑟夫