Re: [R] Plotting 3d data?

From: Wesley Tansey <>
Date: Mon, 16 Jun 2008 13:57:15 -0700

> If your data is really a bunch of points, not on a grid, then you need
> to use plot3d() to plot it as points, or convert it to a surface. The
> interp() function in the akima package can do that. (There are lots of
> other possibilities too.)

Actually, my data is on a grid. The values are something like 0 < x < y < 0.05, with a 0.00005 step for both x and y. I tried using interp() as follows:

data <- ..

x <- data$X

y <- data$Y

z <- data$Z

temp <- interp(x, y, z)
image(temp, add=TRUE)

I figured showing an image would just verify that the grid was formed correctly, but that didn't seem to work.

Wesley mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 16 Jun 2008 - 21:18:35 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 Tue 17 Jun 2008 - 00:30:59 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive