Skip to content
Prev 258160 / 398502 Next

lattice wireframe with logarithmically scaled axis?

On Apr 27, 2011, at 6:49 AM, Dr. Meesters, Christian wrote:

            
The scales information in help(wireframe) refers you to the  
corresponding section of help(xyplot) where an example of changing the  
scales to logarithmic base 2 on the x axis is presented. A  
modification to the arguments in your example restricted to the  
positive-positive quadrant succeeds:

 > require(lattice)
 >
 > x <- seq(0.001, pi, len = 20)
 > y <- seq(0.001, pi, len = 20)
 > g <- expand.grid(x = x, y = y)
 > g$z <- sin(sqrt(g$x^2 + g$y^2))
 > print(wireframe(z ~ x * y, g, drape = TRUE, scales=list(x =  
list(log = 10)),
+                 aspect = c(3,1), colorkey = TRUE))