Add a continuous color ramp legend to a 3d scatter plot
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