Ha. You understood my question perfectly ok and thank you for your answer. Haven't thought that this might be the case, and it is, indeed!
Regards, Ana ________________________________ From: Schalk Heunis <schalk.heu...@gmail.com> Cc: R <r-help@r-project.org> Sent: Monday, September 21, 2009 9:49:48 PM Subject: Re: [R] Three dimensional view of the profiles using 'rgl' package (example of 3 dimensional graphics using rgl package). Ana Not sure if I understood your problem, but on my side, the lines and points are both on the same 3-d picture. However, the lines are just very small: by setting data = data/100, the lines and points are both visible. HTH Schalk Heunis > Hi there, > > Anyone has an idea how to put those two sets of code together so that I can > get a 3-dimensional picture that includes points instead of 2 separate > pictures which doesnt make that much sense at the end. > > #Let's say that these are the data we would like to plot: > > A<-c(62,84,53) > B<-c(64,82,55) > C<-c(56,74,41) > D<-c(46,68,38) > E<-c(71,98,72) > data<-rbind(A,B,C,D,E) > colnames(data)<-c("One", "Two","Three") > > library(rgl) > > # First set of code which gives 3-D picture > rgl.lines(c(0,1.2),c(0,0),c(0,0)) > rgl.lines(c(0,0),c(0,1.2),c(0,0)) > rgl.lines(c(0,0),c(0,0),c(0,1.2)) > rgl.lines(c(0,0),c(0,1),c(1,0),size=2) > rgl.lines(c(0,1),c(1,0),c(0,0),size=2) > rgl.lines(c(0,1),c(0,0),c(1,0),size=2) > > # Second set of code which gives only points that should actually be on the > previous picture > rgl.points(data[,3],data[,1],data[,2], > size=5) > rgl.texts(data[,3],data[,1],data[,2], > text=rownames(data)) > > Looking forward to hear from you. > > Regards, > > Ana > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.