[R] persp/ scatterplot3d

From: Mark Hempelmann <e.rehak_at_t-online.de>
Date: Wed 28 Jun 2006 - 22:55:35 EST

Dear WizaRds,

    I would like to create a 3d-plot with persp(). I sampled 17 points with xyz-coordinates (real-life example!), representing the peaks of the whole plane with "zero coordinates" x=3,y=3,z=3. My intention is to show which entries are above or below the "zero" level with persp() on a nicely created grid. I also tried scatterplot3d(), but, alas, I am unable to tell the function that my points represent the peaks of the plane and are either above or below "normal" (whatever that means...) Please help me:

dat<-matrix(c(1.33,1.00,2.67,4.33,4.00,5.00,0.67,3.33,1.00,3.00,3.00,1.33,1.67,1.67,1.33,1.67,2.33,1.67,0.67,1.00,1.33,3.33,2.67,1.67,1.67,2.67,2.00,0.33,0.67,0.33,2.67,3.33,0.67,0.67,1.33,0.00,4.33,3.33,4.67,3.00,4.00,5.00,4.00,3.67,1.67,3.00,3.67,3.33,1.00,1.33,0.33), ncol=3)
colnames(dat)<-c("x","y","z")

x=dat$x; y=dat$y, z=dat$z
persp(x,y,z) # doesn't work at all, of course, even if I utilize outer()

scatterplot3d(x,y,z) # returns a 3d scatterplot, but not the way I would like to see it fit.

Thank you so much for your help and support!

mark



R-help@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.html Received on Wed Jun 28 23:03:35 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 29 Jun 2006 - 00:12:37 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.