Skip to content
Back to formatted view

Raw Message

Message-ID: <5142EBC4.5090808@yahoo.fr>
Date: 2013-03-15T09:37:08Z
From: Marc Girondot
Subject: Add a continuous color ramp legend to a 3d scatter plot
In-Reply-To: <CA+7RGuiAmq2dQTBR9xawOzPUvEgRB+2_12yJK=q8DD8Bzgp6ag@mail.gmail.com>

Le 14/03/13 18:15, Zhuoting Wu a ?crit :
> I have two follow-up questions:
>
> 1. If I want to reverse the heat.colors (i.e., from yellow to red 
> instead of red to yellow), is there a way to do that?
>
nbcol <- heat.colors(128)
nbcol <- nbcol[128:1]

> 2. I also created this interactive 3d scatter plot as below:
>
> library(rgl)
> plot3d(x=x, y=y, z=z, col=nbcol[zcol], box=FALSE)
>
I have never use such a plot. Sorry

Marc
> Is there any way to add the same legend to this 3d plot?
>
> I'm new to R and try to learn it. I'm very grateful for any help!
>
> thanks,
> Z
>
>


-- 
__________________________________________________________
Marc Girondot, Pr

Laboratoire Ecologie, Syst?matique et Evolution
Equipe de Conservation des Populations et des Communaut?s
CNRS, AgroParisTech et Universit? Paris-Sud 11 , UMR 8079
B?timent 362
91405 Orsay Cedex, France

Tel:  33 1 (0)1.69.15.72.30   Fax: 33 1 (0)1.69.15.73.53
e-mail: marc.girondot at u-psud.fr
Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
Skype: girondot