[R] wireframe shade=T colorkey
karim.rahim at gmail.com
Fri Oct 12 07:06:25 CEST 2007
colorkey: logical indicating whether a color key should be drawn
alongside, or a list describing such a key. See 'levelplot'
So I would like an appropriate colour key (legend perhaps) mapping the
colours to the z-axis values.
wireframe(volcano, drape = T, colorkey = T)
## this draws a colour key to the right of the image.
wireframe(volcano, drape = T, colorkey = list(space="bottom"))
## this draws the colour key to the bottom of the image
wireframe(volcano, drape = T, shade=T, colorkey = T)
## this draws the volcano using different colours (which I prefer),
however, it draws a
##colour key using inappropriate colours.
wireframe(volcano, shade=T, colorkey = T)
##and this places an empty (no colours) colour key to the right
I would like the colour key in the last example (where shade is used)
to show appropriate colours.
I will provide you with a link to a pdf that shows what I observe.
Do you know how do do this?
BTW: If you see different behavior, I am using ubuntu edgy (both 64
and 32chroot) with R Version 2.3.1.
On 10/11/07, Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote:
> 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.
More information about the R-help