Plotting with lattice::wireframe()

279 views Asked by At

I wanted to use

 wireframe(z ~ x * y, shade = TRUE, scales=list(arrows=FALSE),xlab = "x", ylab = "y",zlab = "z")

Both x and y have range from 0 to 1. z however, is in the millions ($MM). I tried plotting and kept getting something like a 2-dimension surface plot on the bottom of the cube..I am suspecting that it's due to scaling? Do you have any tips on how to fix that? Thank you

Unfortunately i don't have enough reputation to post images..

1

There are 1 answers

0
Carl Witthoft On

We don't need an image. We need your source data. But if in fact your "z" data range from zero to 1e6, with only a very few points have large values, then you'll get what you're describing.

Try setting the limits via the zlim argument to wireframe to a range that you believe captures the "interesting" portion of your data.

Another option is to plot log(z)~x*y , assuming all your z-values are greater than 1, or plotting z^(.25)~x*y .