I've created a perspective plot using 'persp' in the graphics package. I'd like to add a second plane of z values to the existing plot, but I cannot seem to do this using 'persp'. Is there an analogue to 'lines' or 'points' for perspectives? Corey. corey.bradshaw at cdu.edu.au
Thanks, Romain. I've certainly used that to draw lines and points in the plots produced by 'persp'; however, my problem is that I need to incorporate an entirely new z function (not just a plane) onto the same plot (i.e., using the same x and y values). Corey -----Original Message----- From: francoisromain at free.fr [mailto:francoisromain at free.fr] Sent: Wednesday, December 15, 2004 4:30 PM To: Corey Bradshaw Cc: R-help at stat.math.ethz.ch Subject: Hello, Just look at the examples in ?persp. There is a function called trans3d defined in it that will traduce your 3D coordinates to 2D, and so you will be able to draw lines with lines function. Romain. Corey Bradshaw a ??crit :>I've created a perspective plot using 'persp' in the graphics package. >I'd like to add a second plane of z values to the existing plot, but I >cannot seem to do this using 'persp'. Is there an analogue to 'lines' or >'points' for perspectives? > >Corey. >corey.bradshaw at cdu.edu.au >-- Romain FRANCOIS : francoisromain at free.fr page web : http://addictedtor.free.fr/ (en construction) 06 18 39 14 69 / 01 46 80 65 60 _______________________________________________________ Etudiant en 3eme ann??e Institut de Statistique de l'Universit?? de Paris (ISUP) Fili??re Industrie et Services http://www.isup.cicrp.jussieu.fr/
Hi Corey Did you try to use par(new=TRUE) before ploting the second persp graph? Cheers Petr On 15 Dec 2004 at 10:44, Corey Bradshaw wrote:> I've created a perspective plot using 'persp' in the graphics package. > I'd like to add a second plane of z values to the existing plot, but I > cannot seem to do this using 'persp'. Is there an analogue to 'lines' > or 'points' for perspectives? > > Corey. > corey.bradshaw at cdu.edu.au > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.htmlPetr Pikal petr.pikal at precheza.cz
Hi there, Turns out it was a simply 'par' problem I just needed to establish par(new = TRUE) after the first 'persp' plot and prior to coding the 2nd 'persp' plot. Thanks for your suggestions. Corey -----Original Message----- From: Deepayan Sarkar [mailto:deepayan at stat.wisc.edu] Sent: Thursday, December 16, 2004 12:14 AM To: r-help at stat.math.ethz.ch Cc: Corey Bradshaw Subject: Re: [R] RE: adding perspectives to existing persp plots On Wednesday 15 December 2004 01:10, Corey Bradshaw wrote:> Thanks, Romain. I've certainly used that to draw lines and points in > the plots produced by 'persp'; however, my problem is that I need to > incorporate an entirely new z function (not just a plane) onto the > same plot (i.e., using the same x and y values).If the surfaces are non-intersecting, you might be able to use 'wireframe' from the lattice package. See the second example in ?wireframe. Deepayan