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

Petr Pikal petr.pikal at precheza.cz
Mon Dec 22 09:54:46 CET 2003


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,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,y)
> at 2 dimension according to first two columns of
> matrix. Then I want to connect
> same value z=(x,y). Thanks!
>   zhang
> 
> The data file looks like this:
> X          y               z
> 4           0.33          0.99
> 4           0.5            1.2
> 5           0.66          1.2
> 5           0.7            1.5
> 6           2               1.2
> ?
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Petr Pikal
petr.pikal at precheza.cz




More information about the R-help mailing list