Message-ID: <20030601172109.GA20216@pcf004.jinr.ru>
Date: 2003-06-01T17:21:10Z
From: Timur Elzhov
Subject: persp & colors
In-Reply-To: <3EDA2FA3.8020207@statistik.uni-dortmund.de>
On Sun, Jun 01, 2003 at 06:53:55PM +0200, Uwe Ligges wrote:
>> but I'd like to persp()' colors behave like in image() function!
> That's not easy, because you have to redefine x, y and z values.
>
> Simple example:
>
> x <- y <- 1:2
> z <- matrix(1:4, 2)
> image(x, y, z) # OK, quite nice
>
> but
>
> persp(x, y, z)
>
> has only one facet. So the only way is to calculate the 9 values for x,
> y, and z to get the corners for the 4 facets in it.
> That's easy for x and y, but can be impossible for z...
OK, thank you for answer!
But, I saw that other mathematic frameworks (CERN ROOT for instance)
can plot 3D surfaces with colors corresponding to z-value.
Is there way to do this in R (with another functions/packages)?
It's not necessary to use _one_ color per facet, yes?.. :)
--
WBR,
Timur.