Re: [R] R[Mailman] question: contour plot for discrete data

2003-12-23 Thread Paul Murrell
Hi Renaud Lancelot wrote: Dieter Menne a écrit : You wrote: --- I have matrix (n x3) that represents discrete data. Each row of matrix is 3-D point (x,y,z). I would like to get contour map (z value) at two dimension (x,y). How can I use related contour function to do this job? --- Paul Murrell

[R] R[Mailman] question: contour plot for discrete data

2003-12-23 Thread Dieter Menne
You wrote: --- I have matrix (n x3) that represents discrete data. Each row of matrix is 3-D point (x,y,z). I would like to get contour map (z value) at two dimension (x,y). How can I use related contour function to do this job? --- Paul Murrell ([EMAIL PROTECTED]) sent me his little clines pa

Re: [R] [Mailman] question: contour plot for discrete data

2003-12-22 Thread Petr Pikal
Hi library(akima) function contour(interp(x,y,z)) is one possibility Cheers Petr On 19 Jan 2058 at 48:211, L Z wrote: > Question: > I have matrix (n x3) that represents discrete data. > Each row of matrix is 3-D point (x,y,z). I would like > to get contour map (z value) at two dimension > (x

Re: [R] [Mailman] question: contour plot for discrete data

2003-12-21 Thread Roger Bivand
On Sun, 21 Dec 2003, Spencer Graves wrote: > Have you considered "interp", as in the following example: in the akima package, just to make this plain. > > XY <- expand.grid(x=1:11, y=1:11) > XY$z <- XY$x+XY$y > contour(interp(XY$x, XY$y, XY$z)) > > hope this helps. spencer graves > > Thomas

Re: [R] [Mailman] question: contour plot for discrete data

2003-12-21 Thread Spencer Graves
Have you considered "interp", as in the following example: XY <- expand.grid(x=1:11, y=1:11) XY$z <- XY$x+XY$y contour(interp(XY$x, XY$y, XY$z)) hope this helps. spencer graves Thomas W Blackwell wrote: Dear L Z - Before using contour() one needs to interpolate the z values to all points i

Re: [R] [Mailman] question: contour plot for discrete data

2003-12-21 Thread Thomas W Blackwell
Dear L Z - Before using contour() one needs to interpolate the z values to all points in a rectangular grid. 2D interpolation is not trivial. The package KernSmooth (case-sensitive) will do this for a density estimate but not, apparently, when z values are given. Perhaps packages splines or

[R] [Mailman] question: contour plot for discrete data

2003-12-19 Thread L Z
Question: I have matrix (n x3) that represents discrete data. Each row of matrix is 3-D point (x,y,z). I would like to get contour map (z value) at two dimension (x,y). How can I use related contour function to do this job? I am not sure if I clarify this question. For example, we can get point (x