[R] 3D plots with data.frame

From: H. Paul Benton <hpbenton_at_scripps.edu>
Date: Fri, 25 May 2007 14:40:06 -0700


Dear all,  

    Thank you for any help. I have a data.frame and would like to plot it in 3D. I have tried wireframe() and cloud(), I got

scatterplot3d(xs)
Error: could not find function "scatterplot3d"

> wireframe(xs)

Error in wireframe(xs) : no applicable method for "wireframe"

> persp(x=x, y=y, z=xs)

Error in persp.default(x = x, y = y, z = xs) :

        (list) object cannot be coerced to 'double'
> class(xs)

[1] "data.frame"
Where x and y were a sequence of my min -> max by 50 of xs[,1] and xs[,2].

my data is/looks like:

> dim(xs)

[1] 400 4
> xs[1:5,]

        x       y     Z1     Z2
1 27172.4 19062.4      0    128
2 27000.9 19077.8      0      0
3 27016.8 19077.5      0      0
4 27029.5 19077.3      0      0
5 27045.4 19077.0      0      0

    Cheers,

    Paul

-- 
Research Technician
Mass Spectrometry
   o The
  /
o Scripps
  \
   o Research
  /
o Institute

______________________________________________
R-help_at_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
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 25 May 2007 - 21:45:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 26 May 2007 - 01:31:20 GMT.

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