On Thu, Oct 1, 2009 at 6:38 AM, Lorenzo Isella <lorenzo.isella at
gmail.com> wrote:> Dear All,
> Here is what I am trying to achieve: I would like to plot some data in 3D.
> Usually, one has a matrix of the kind
>
> y_1(x_1) , y_1(x_2).....y_1(x_i)
> y_2(x_1) , y_2(x_2).....y_2(x_i)
> ...........................................
> y_n(x_1) , y_n(x_2)......y_n(x_i)
>
>
> where e.g. y_2(x_1) is the value of y at time 2 at point x_1 (see that the
> grid in x is the same for the y values at all times).
> Instead, in my case, the quantity y is observed at each time on a different
> grid in x; in other words not only do I have a different number of
> observations (y values) at each time, but I also have observations taken on
> a a different x grid each time.
> As a matter of fact, it is as if I had a set of independent observations,
> for each of which I can create effortlessly a 2D plot, that I want to
stitch
> together into a 3D plot.
> I have no idea of how to achieve that. Examples I have found with lattice
or
> scatterplot3D all assume a regular grid like the one I described above.
3-D scatter plots with cloud() etc. should be easy with irregular
data. Surfaces do require a regular grid, and you need some form of
interpolation for that. The akima package seems popular for that (I
haven't used it myself).
-Deepayan