
A função panel.3d.contour.R foi feita a partir de soluções extraídas de listas de discussão. O exemplo abaixo ilustra como usar. Para mais informações, consulte a documentação da função. source(" https://raw.githubusercontent.com/walmes/wzRfun/master/R/panel.3d.contour.R ") library(lattice) library(RColorBrewer) colr <- brewer.pal(11, "Spectral") colr <- colorRampPalette(colr, space = "rgb") grid <- expand.grid(x = seq(-1, 1, by = 0.1), y = seq(-1, 1, by = 0.1)) grid$z <- with(grid, 1 + 0.01 * x + 0.05 * y - 0.5 * x * y - 0.5 * x^2 - 0.2 * y^2) wireframe(z ~ x + y, data = grid, scales = list(arrows = FALSE), zlim = extendrange(grid$z, f = 0.5), panel.3d.wireframe = panel.3d.contour, nlevels = 18, col = "gray30", type = c("on", "top", "bottom"), col.regions = colr(101), drape = TRUE) À disposição. Walmes.