filled.contour
. It additionally plots a polygonal boundary.Level (Contour) Plots with Polygonal Boundary
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, ...)
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
.
See x
arg.
a matrix containing the values to be plotted (NA
s are
allowed). Note that x
can be used instead of z
for
convenience.
a matrix containing the x,y
-coordinates of the
vertices of the polygon boundary.
x
limits for the plot.
y
limits for the plot.
z
limits for the plot.
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.
if levels
is not specified, the range of z
is
divided into approximately this many levels.
a color palette function used to assign colors in the plot.
an explicit set of colors to be used in the plot. This argument overrides any palette function specification.
numeric vector of levels at which to draw contour
lines, default is the same as levels
.
a vector giving the labels for the contour lines. If
NULL
then the levels are used as labels.
cex
for contour labelling.
logical, contour lines are labelled if TRUE
.
character string specifying where the labels will be located. Possible values are "simple", "edge" and "flattest" (the default). See the Details section.
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).
color for the lines drawn.
line type for the lines drawn.
line width for the lines drawn.
statement which add title to the main plot.
statement which draws axes on the main plot. This overrides the default axes.
statement which adds title to the plot key.
statement which draws axes on the plot key. This overrides the default axis.
the y/x
aspect ratio, see plot.window
.
the x
axis style. The default is to use internal
labeling.
the y
axis style. The default is to use internal
labeling.
the style of labeling to be used. The default is to use horizontal labeling.
Logical. Should axes be drawn? See
plot.default
.
additional graphical parameters.
filled.contour
, contour
and
pinpoly