[R] Cannot set wireframe ticks?

Fredrik Johansson fredjoha at gmail.com
Tue Nov 24 05:32:08 CET 2009


I have an issue when making a wireframe plot. I can't find any way to
change the number of ticks on the labels. I try to set it in the code
below with z.ticks=1, but that doesn't work. Is there anything that
works? (Note. I need to use wireframe. persp is out of the question
since I want mathematics in the axis labels).

Here is some sample code:

library(lattice)
x <- as.matrix(seq(0,pi,0.1))
z <- sin(x) %*% t(sin(x))
dim(z) <- NULL
xy <- expand.grid(x,x)
w <- data.frame(xy[,1],z,xy[,2])
colnames(w) <- c('x','z','y')
wireframe(z~x*y, data = w,
          xlab   = expression(italic(x)),
          ylab   = expression(italic(y)),
          zlab   = expression(sin(italic(x*y))),
          screen = list(z=25,x=-60),
          scales = list(z.ticks=1, arrows=FALSE))

I'm thankful for any help!
Best regards,
Fredrik Johansson




More information about the R-help mailing list