Rev 7324 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{filled.contour}\alias{filled.contour}\title{Level (Contour) Plots}\usage{filled.contour(x = seq(0, 1, len = nrow(z)),y = seq(0, 1, len = ncol(z)),z,xlim = range(x, finite=TRUE),ylim = range(y, finite=TRUE),zlim = range(z, finite=TRUE),nlevels = 20, levels = pretty(zlim, nlevels),color.palette = cm.colors,col = color.palette(length(levels) - 1),plot.title, plot.axes, key.title, key.axes,asp = NA, xaxs = "i", yaxs = "i", las = 1, axes = TRUE,\dots)}\arguments{\item{x,y}{locations of grid lines at which the values in \code{z} aremeasured. These must be in ascending order. By default, equallyspaced values from 0 to 1 are used. If \code{x} is a \code{list},its components \code{x$x} and \code{x$y} are used for \code{x}and \code{y}, respectively. If the list has component \code{z} thisis used for \code{z}.}\item{z}{a matrix containing the values to be plotted (\code{NA}s areallowed). Note that \code{x} can be used instead of \code{z} forconvenience.}\item{xlim}{x limits for the plot.}\item{ylim}{y limits for the plot.}\item{zlim}{z limits for the plot.}\item{levels}{a set of levels which are used to partition the rangeof \code{z}. Areas with \code{z} values between consecutivelevels are painted with the same color.}\item{nlevels}{if \code{levels} is not specified, the range of \code{z},values is divided into approximately this many levels.}\item{color.palette}{a color palette function to be used to assigncolors in the plot.}\item{col}{an explicit set of colors to be used in the plot.This argument overrides any palette function specification.}\item{plot.title}{statements which add titles the main plot.}\item{plot.axes}{statements which draw axes on the main plot.This overrides the default axes.}\item{key.title}{statements which add titles for the plot key.}\item{key.axes}{statements which draw axes on the plot key.This overrides the default axis.}\item{asp}{the \eqn{y/x} aspect ratio, see \code{\link{plot.window}}.}\item{xaxs}{the x axis style. The default is to use internallabeling.}\item{yaxs}{the y axis style. The default is to use internallabeling.}\item{las}{the style of labeling to be used. The default is touse horizontal labeling. }\item{\dots}{additional graphical parameters.}}\description{This function produces a contour plot with the areas betweenthe contours filled in solid color (Cleveland calls this alevel plot). A key showing how the colors map to z valuesis shown to the right of the plot.}\references{Cleveland, W. S. (1993)\emph{Visualizing Data}.Summit, New Jersey: Hobart.}\author{Ross Ihaka.}\note{This function currently uses the \code{layout} function and sois restricted to a full page display. In future it is likely tobe replaced by a genuine \code{levelplot} function which willwork in multipanel displays.}\seealso{\code{\link{contour}}, \code{\link{image}}, \code{\link{palette}}.}\examples{data(volcano)filled.contour(volcano, color = terrain.colors, asp = 1)# simplex <- 10*1:nrow(volcano)y <- 10*1:ncol(volcano)filled.contour(x, y, volcano, color = terrain.colors,plot.title = title(main = "The Topography of Maunga Whau",xlab = "Meters North", ylab = "Meters West"),plot.axes = { axis(1, seq(100, 800, by = 100))axis(2, seq(100, 600, by = 100)) },key.title = title(main="Height\n(meters)"),key.axes = axis(4, seq(90, 190, by = 10)))# maybe also asp=1mtext(paste("filled.contour(.) from", R.version.string),side = 1, line = 4, adj = 1, cex = .66)}\keyword{hplot}\keyword{aplot}