Re: [R] plotting image/contour on irregular grid

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Sat 07 May 2005 - 05:45:39 EST


On Fri, 6 May 2005, m p wrote:

> Hello,
> I'd like to make a z(x,y) plot for irregularly spaced
> x,y. What are routines are available in R for this
> purpose?

One possibility is to interpolate a regular grid using interp() in the akima package, then use image() or contour(). Another is to use levelplot() with formula z ~ x + y in the lattice package, and the equivalent contourplot(); here, the x,y pairs must lie on a grid, but do not need to fill the grid (so are regularly spaced with missing grid cells).

> Thanks,
> Mark
>
> ______________________________________________
> R-help@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
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no

______________________________________________
R-help@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
Received on Sat May 07 06:06:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:37 EST