Hi all In two days, I am giving a small, informal workshop in our Department about using R. Initially, it was just for statistician, but surprisingly (to me anyhow) many mathematicians are also coming who have a MATLAB background. They are coming at the Workshop from a teaching perspective. They are considering using R to avoid licensing issues with MATLAB. One thing they were hoping me to show them was some 3D plotting. I have used persp and image and all. But what about, say, plottting intersecting planes? I can't seem to find a way of plotting in 3D, and then adding another plot. I guess I am after a 3D equivalent of lines or points; one plots the original plot and then adds to it. Ideally, this would be a simple task; we wouldn't want to have our students mucking about too much to plot two planes intersecting. Thanks as always. P. --- Dr Peter Dunn dunn@ usq.edu.au (USQ CRICOS No. 00244B) <Insert favourite worthless disclaimer here> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dunn wrote:> They are considering using R to avoid licensing issues with > MATLAB. One thing they were hoping me to show them was someNothing against R, but the GNU equivalent (more matrix oriented etc) is Octave, which is as close to the emulation of MATLAB as you can get. -- Matej Cepl, matej at ceplovi.cz, Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488 All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer. -- IBM maintenance manual, 1925 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hello Peter, Please check the help-mailing list on March 15th and 17th 2002, there were posted similar questions to yours. Although the thread did not provide examples that respond exactly to your question, they offer ways to achieve that. Regards, Carlos. -----Mensaje original----- De: owner-r-help at stat.math.ethz.ch [mailto:owner-r-help at stat.math.ethz.ch]En nombre de Peter Dunn Enviado el: martes, 19 de noviembre de 2002 7:41 Para: r-help at stat.math.ethz.ch Asunto: [R] plotting intersecting planes Hi all In two days, I am giving a small, informal workshop in our Department about using R. Initially, it was just for statistician, but surprisingly (to me anyhow) many mathematicians are also coming who have a MATLAB background. They are coming at the Workshop from a teaching perspective. They are considering using R to avoid licensing issues with MATLAB. One thing they were hoping me to show them was some 3D plotting. I have used persp and image and all. But what about, say, plottting intersecting planes? I can't seem to find a way of plotting in 3D, and then adding another plot. I guess I am after a 3D equivalent of lines or points; one plots the original plot and then adds to it. Ideally, this would be a simple task; we wouldn't want to have our students mucking about too much to plot two planes intersecting. Thanks as always. P. --- Dr Peter Dunn dunn@ usq.edu.au (USQ CRICOS No. 00244B) <Insert favourite worthless disclaimer here> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ _____ The information in this email is confidential and it may not be disclosed or used by anyone other than the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted is prohibited and may be unlawful. Minorplanet cannot accept responsibility for the accuracy or completeness of this email as it has been transmitted over a public network. If you suspect that the email may have been amended, please call the sender. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I believe there's also scilab (http://www-rocq.inria.fr/scilab/), which has its own graphics. Octave relies on gnuplot, if I'm not mistaken. Andy -----Original Message----- From: Matej Cepl [mailto:matej at ceplovi.cz] Sent: Tuesday, November 19, 2002 10:01 AM To: r-help at stat.math.ethz.ch Subject: Re: [R] plotting intersecting planes Peter Dunn wrote:> They are considering using R to avoid licensing issues with > MATLAB. One thing they were hoping me to show them was someNothing against R, but the GNU equivalent (more matrix oriented etc) is Octave, which is as close to the emulation of MATLAB as you can get. -- Matej Cepl, matej at ceplovi.cz, Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488 All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer. -- IBM maintenance manual, 1925 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ============================================================================= -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Many thanks to all who replied to:> > They are considering using R to avoid licensing issues with > > MATLAB....by indicating that SciLab and Octave are available. We actually are aware of both, and have at times tried both. R is being considered as it possibly caters better for both the mathematics and statistics courses in our Department, without having to support two packages (such as Octave *and* R). Still, I am looking forward to any more possible solutions to the original question, though Carlos Ortega suggested I search the News archive. The solution appears to be to use scatterplot3d, which isn't with my R, so I'll have to grab it and have a look. The original request:> about, say, plottting intersecting planes? I can't seem to find a > way of plotting in 3D, and then adding another plot. > I guess I am after a 3D equivalent of lines or points; > one plots the original plot and then adds to it. > > Ideally, this would be a simple task; we wouldn't want to have > our students mucking about too much to plot two planes intersecting.Ideally, a simpler solution is still preferred! But thanks again to everyone. P. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dunn wrote:> But what about, say, plottting intersecting planes? I can't seem to find a > way of plotting in 3D, and then adding another plot.Here's a simple example. As Paul Murrell said, though, there's no hidden surface removal. trans3d <- function(x,y,z, pmat) { # Thanks, Ben Bolker! tmat <- t(cbind(x,y,z,1) %*% pmat) list(x=tmat[1,]/tmat[4,], y=tmat[2,]/tmat[4,]) } pmat <- persp(0:1,0:1,matrix(NA,2,2), xlim=c(-5,5), ylim=c(-5,5), zlim=c(0,2), theta=25, phi=30, expand=.5, xlab="X", ylab="Y", zlab="Z") polygon(trans3d(c(-3,3,3,-3), c(-5,-5,5,5), c(2,0,0,2), pmat), border="blue") polygon(trans3d(c(3,-3,-3,3), c(-5,-5,5,5), c(2,0,0,2), pmat), border="red") lines(trans3d(c(0,0), c(-5,5), c(1,1), pmat)) # The line of intersection -- -- David Brahm (brahm at alum.mit.edu) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._