[R] help with simple 3d graph
Frank Johannes
fjohannes at fastmail.fm
Fri Dec 9 05:02:52 CET 2005
I have a large matrix and want to create a 3d surface of it.
Suppose the matrix looks something like Matrix K:
a<-c(1:1200)
b<-c(rep(1:30,40))
c<-c(a+b^2)
K<-data.frame(a,b,c)
The vector values are not ordered (and repeat themselves as in b).
Whenever I try commands like "persp" it wants ordered values.
The only command that approximates what I want is "scatterplot3d"
(see
below)
library(scatterplot3d)
scatterplot3d(a,b,c)
Can anybody help me with this. Thanks very much.
Frank.
--
More information about the R-help
mailing list