Re: [R] help with simple 3d graph

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Fri 09 Dec 2005 - 18:33:21 EST

Frank Johannes wrote:
> 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)

For a surface, see ?persp or ?wireframe in package "lattice".

Uwe Ligges

> Can anybody help me with this. Thanks very much.
> Frank.
>
> --
>
> ______________________________________________
> 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



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 Fri Dec 09 18:37:51 2005

This archive was generated by hypermail 2.1.8 : Fri 09 Dec 2005 - 20:30:53 EST