Skip to content
Prev 7284 / 63421 Next

Bug: persp and colors (PR#1476)

Hi
facets
facet A
I don't think this is a bug -- I think the problem is that the surface
produced for the z of dimension 21x21 has only 20x20 facets.  For example,
the following is not a solution, but it shows that a 20x20 colour matrix
produces the expected result ...

    persp(x, y, z, col = gray(hgt[1:20,1:20]), theta = 0, phi = 40, expand =
0.4)

... now, what you really want I guess is to calculate hgt to be some
interpolation of the four z values at the four corners of each face.  I am
due somewhere so this calculation is left as an exercise ...

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._