# filled.contour

0th

Percentile

##### Level (Contour) Plots

This function produces a contour plot with the areas between the contours filled in solid color (Cleveland calls this a level plot). A key showing how the colors map to z values is shown to the right of the plot.

Keywords
hplot, aplot
##### Usage
filled.contour(x = seq(0, 1, length.out = nrow(z)),
y = seq(0, 1, length.out = ncol(z)),
z,
xlim = range(x, finite = TRUE),
ylim = range(y, finite = TRUE),
zlim = range(z, finite = TRUE),
levels = pretty(zlim, nlevels), nlevels = 20,
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, frame.plot = axes, …)

.filled.contour(x, y, z, levels, col)

##### Arguments
x, y

locations of grid lines at which the values in z are measured. These must be in ascending order. (The rest of this description does not apply to .filled.contour.) 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 numeric matrix containing the values to be plotted.. 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.

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, values is divided into approximately this many levels.

color.palette

a color palette function to be 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. There should be one less color than levels

plot.title

statements which add titles to the main plot.

plot.axes

statements which draw axes (and a box) on the main plot. This overrides the default axes.

key.title

statements which add titles for the plot key.

key.axes

statements which draw 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, frame.plot

logicals indicating if axes and a box should be drawn, as in plot.default.

additional graphical parameters, currently only passed to title().

##### Details

The values to be plotted can contain NAs. Rectangles with two or more corner values are NA are omitted entirely: where there is a single NA value the triangle opposite the NA is omitted.

Values to be plotted can be infinite: the effect is similar to that described for NA values.

.filled.contour is a ‘bare bones’ interface to add just the contour plot to an already-set-up plot region. It is is intended for programmatic use, and the programmer is responsible for checking the conditions on the arguments.

##### Note

filled.contour uses the layout function and so is restricted to a full page display.

The output produced by filled.contour is actually a combination of two plots; one is the filled contour and one is the legend. Two separate coordinate systems are set up for these two plots, but they are only used internally -- once the function has returned these coordinate systems are lost. If you want to annotate the main contour plot, for example to add points, you can specify graphics commands in the plot.axes argument. See the examples.

##### References

Cleveland, W. S. (1993) Visualizing Data. Summit, New Jersey: Hobart.