celestialgod

lattice log-scaled plot

Jan 1st, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.43 KB | None | 0 0
  1. library(lattice)
  2. g <- expand.grid(x = 1:10, y = 5:15)
  3. g$z <- log((g$x + g$y^2))
  4. wireframe(z ~ x + y, data = g,
  5.           scales = list(arrows = FALSE, x = list(log = 10)),
  6.           drape = TRUE, colorkey = TRUE,
  7.           screen = list(z = 30, x = -60))
  8. windows()
  9. wireframe(z ~ log10(x) + y, data = g,
  10.           scales = list(arrows = FALSE),
  11.           drape = TRUE, colorkey = TRUE,
  12.           screen = list(z = 30, x = -60))
Advertisement
Add Comment
Please, Sign In to add comment