[R] wireframe shade=T colorkey

Deepayan Sarkar deepayan.sarkar at gmail.com
Fri Oct 12 00:32:27 CEST 2007


On 10/11/07, Karim Rahim <karim.rahim at gmail.com> wrote:
> Thank you for your reply.
>
> In this graphics context, I'm not sure what the incident or reflected
> light rays are.
>
> May I ask for an example of using a colour key with the volcano data
> using the colours that appear when you select the shade option?
>
> It is simple to have the colour key appear using drape. Perhaps it is
> not so simple to have a colour key using shade colours or different
> colours. Once again, may I ask for an example of setting these colour
> key and/or colour options?

I'm not really sure what you want. The goal of the colorkey is to
associate a given z-value (or height) with a specific color.
drape=TRUE does this, e.g.,

wireframe(volcano, drape = TRUE, colorkey = TRUE)

Now, with shade=TRUE, e.g.,

wireframe(volcano, shade = TRUE)

the SAME Z-VALUE CAN HAVE DIFFERENT COLORS depending on the
orientation of the facet with respect to the viewing direction and the
light source. So, a colorkey DOES NOT MAKE SENSE.

-Deepayan



More information about the R-help mailing list