From oliver.niggemann@acterna.com  Tue Apr 23 08:41:42 2002
From: oliver.niggemann@acterna.com (oliver.niggemann@acterna.com)
Date: Tue, 23 Apr 2002 09:41:42 +0200 (MET DST)
Subject: [Rd] Bug: persp and colors (PR#1476)
Message-ID: <200204230741.JAA02655@pubhealth.ku.dk>

Full_Name: Oliver Niggemann
Version: Windows 1.4 patched
OS: Windows NT 4.0
Submission from: (NULL) (141.169.250.14)


Hello,

I am working with the persp command. I want to change to color of the facets
according
to their z-value. The colors seems to be transposed, i.e. the color of a facet A
seems
to be used for a facet B which is a (defined?) way off....

An example:

nx <- 21 
ny <- 21 
x <- seq(-1, 1, length = nx) 
y <- seq(-1, 1, length = ny)
z <- outer(x, y, function(x,y) x^2 + y^2) 
hgt <- z / max(z) 
persp(x, y, z, col = gray(1 - hgt), theta = 70, phi = 40, expand = 0.4)

Now the z-value should define the color, but the color pattern seems to be
moved.

Thanks,
    Oliver Niggemann

 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Bug: persp and colors (PR#1476)
oliver.niggemann@acterna.com