filled.contour.poly {spatialkernel} | R Documentation |
This is a revised version of the base R function
filled.contour
. It additionally plots a polygonal
boundary.
filled.contour.poly(x = seq(min(poly[,1]), max(poly[,1]), len = nrow(z)), y = seq(min(poly[,2]), max(poly[,2]), len = ncol(z)), z, poly, xlim = range(x, finite=TRUE), ylim = range(y, finite=TRUE), zlim = range(z, finite=TRUE), levels = pretty(zlim, nlevels), nlevels = 10, color.palette = risk.colors, col = color.palette(length(levels) - 1), llevels = levels, labels = NULL, labcex = 0.6, drawlabel = TRUE, method = "flattest", vfont = c("sans serif", "plain"), lcol = par("fg"), lty = par("lty"), lwd = par("lwd"), plot.title, plot.axes, key.title, key.axes, asp = NA, xaxs = "i", yaxs = "i", las = 1, axes = TRUE, ...)
x,y |
locations of grid lines at which the values in z are
measured. These must be in ascending order. By default, equally
spaced values from 0 to 1 are used. If x is a list, its
components x$x and x$y are used for x and
y , respectively. If the list has component z this is
used for z . |
z |
a matrix containing the values to be plotted (NA s are
allowed). Note that x can be used instead of z for
convenience. |
xlim |
x limits for the plot. |
ylim |
y limits for the plot. |
zlim |
z limits for the plot. |
poly |
a matrix containing the x,y -coordinates of the
vertices of the polygon boundary. |
levels |
a set of levels which are used to partition the range of
z . Must be strictly increasing (and finite). Areas with
z values between consecutive levels are painted with the same
color. |
nlevels |
if levels is not specified, the range of z is
divided into approximately this many levels. |
color.palette |
a color palette function used to assign colors in the plot. |
col |
an explicit set of colors to be used in the plot. This argument overrides any palette function specification. |
llevels |
numeric vector of levels at which to draw contour
lines, default is the same as levels . |
labels |
a vector giving the labels for the contour lines. If
NULL then the levels are used as labels. |
labcex |
cex for contour labelling. |
drawlabel |
logical, contour lines are labelled if TRUE . |
method |
character string specifying where the labels will be located. Possible values are "simple", "edge" and "flattest" (the default). See the Details section. |
vfont |
if a character vector of length 2 is specified, then
Hershey vector fonts are used for the contour labels. The first
element of the vector selects a typeface and the second element
selects a fontindex (see text for more information). |
lcol |
color for the lines drawn. |
lty |
line type for the lines drawn. |
lwd |
line width for the lines drawn. |
plot.title |
statement which add title to the main plot. |
plot.axes |
statement which draws axes on the main plot. This overrides the default axes. |
key.title |
statement which adds title to the plot key. |
key.axes |
statement which draws axes on the plot key. This overrides the default axis. |
asp |
the y/x aspect ratio, see
plot.window . |
xaxs |
the x axis style. The default is to use internal
labeling. |
yaxs |
the y axis style. The default is to use internal
labeling. |
las |
the style of labeling to be used. The default is to use horizontal labeling. |
axes, ... |
additional graphical parameters. |
By defining z
values as NA
at points outside the
polygonal boundary, filled.contour.poly
produces a contour plot
within the polygonal boundary.
filled.contour
, contour
and
pinpoly