Description Usage Arguments Details Author(s) See Also Examples
Represents an irregular set of (x, y) points with a color covariate. Polygons are drawn enclosing the area closest to each point. This is known variously as a Voronoi mosaic, a Dirichlet tesselation, or Thiessen polygons.
1 2 3 
x, data 
formula and data as in

aspect 
aspect ratio: "iso" is recommended as it reproduces the distances used in the triangulation calculations. 
panel, prepanel 
see 
... 
further arguments to the panel function, which defaults to

See panel.voronoi
for further options and details.
Felix Andrews felix@nfrac.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33  xyz < data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100))
tileplot(z ~ x * y, xyz)
## tripack is faster but nonfree
## Not run:
tileplot(z ~ x * y, xyz, use.tripack = TRUE)
## End(Not run)
## showing rectangular window boundary
tileplot(z ~ x * y, xyz, xlim = c(2, 4), ylim = c(2, 4))
## insert some missing values
xyz$z[1:10] < NA
## the default na.rm = FALSE shows missing polygons
tileplot(z ~ x * y, xyz, border = "black",
col.regions = grey.colors(100),
pch = ifelse(is.na(xyz$z), 4, 21),
panel = function(...) {
panel.fill("hotpink")
panel.voronoi(...)
})
## use na.rm = TRUE to ignore points with missing values
update(trellis.last.object(), na.rm = TRUE)
## a quick and dirty approximation to US state boundaries
tmp < state.center
tmp$Income < state.x77[,"Income"]
tileplot(Income ~ x * y, tmp, border = "black",
panel = function(x, y, ...) {
panel.voronoi(x, y, ..., points = FALSE)
panel.text(x, y, state.abb, cex = 0.6)
})

Loading required package: lattice
Loading required package: RColorBrewer
PLEASE NOTE: The components "delsgs" and "summary" of the
object returned by deldir() are now DATA FRAMES rather than
matrices (as they were prior to release 0.018).
See help("deldir").
PLEASE NOTE: The process that deldir() uses for determining
duplicated points has changed from that used in version
0.09 of this package (and previously). See help("deldir").
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.