How to add background grids in an R lattice::wireframe plot?

Viewed 249

I loved a 3D plot I saw in this article and I am trying to reproduce it with my own data.

So far, I'm quite happy with the plot I obtain with the following code:

d <- expand.grid(x = seq(0, 20, by = 1), 
                 y = seq(3.5, 5.5, by = .2))
d <- dplyr::mutate(d, z = (5.4 + (-25.5*x) + 
                          (12.5*(x^2)) + 
                          (1.5*y) + 
                          (0.03*y*x) + 
                          (-1.23*y*(x^2))))
lattice::wireframe(z ~ x * y, 
                   data = d,
                   screen = list(z = 130, x = -70),
                   scales = list(arrows = F))

Output: enter image description here

However (I apologise for my ignorance in advance), although I am sure that it has to be possible, I can't figure out how to include the grid on each of the three back planes, in the same fashon than it appears in the paper I linked at the beginning. Is it possible? How would you do that?

0 Answers
Related