Dear all,
I need to plot more than one surface in 3D using R.
I tried with "persp" function, it produce only one surface.
Could you please help me how can I do it? The X and Y axis are the same
but I have Z1 and Z2. I want to have both results in one graph.
Thanks
Amir
--
__________________________________________________________________________
Amir Darehshoorzadeh | Computer Engineering Department
PostDoc Fellow | University of Ottawa, Paradise LAb
Email: adarehsh at uottawa.ca | 800 King Edward Ave
Tel: - | ON K1N 6N5, Ottawa - CANADA
http://personals.ac.upc.edu/amir
On 14/05/2013 1:10 PM, Amir wrote:> Dear all, > > I need to plot more than one surface in 3D using R. > I tried with "persp" function, it produce only one surface. > Could you please help me how can I do it? The X and Y axis are the same > but I have Z1 and Z2. I want to have both results in one graph.That's quite hard to do with persp because it needs to plot the segments in a certain order. You can do it in the rgl package using persp3d for the first surface, then persp3d( ..., add=TRUE) for the second. Note that persp3d and persp use slightly different conventions for how to specify colours; see ?persp3d for details. Duncan Murdoch