Description Usage Arguments Value Author(s) See Also Examples
This is an enhancement to contour
, written as a wrapper for that function.
It creates a contour plot, or adds contour lines to an existing plot, allowing the contours to
be filled and returning the list of contour lines.
1 2 3 4 5 6 7 8 | contourf(x = seq(0, 1, length.out = nrow(z)), y = seq(0, 1, length.out = ncol(z)), z,
nlevels = 10, levels = pretty(zlim, nlevels),
zlim = range(z, finite = TRUE),
col = par("fg"),
color.palette = colorRampPalette(c("white", col)),
fill.col = color.palette(nlevels+1),
fill.alpha = 0.5,
add = FALSE, ...)
|
x, y |
locations of grid lines at which the values in |
z |
a matrix containing the values to be plotted (NAs are allowed).
Note that |
nlevels |
number of contour levels desired iff levels is not supplied |
levels |
numeric vector of levels at which to draw contour lines |
zlim |
z-limits for the plot. x-limits and y-limits can be passed through ... |
col |
color for the lines drawn |
color.palette |
a color palette function to be used to assign fill colors in the plot |
fill.col |
a call to the |
fill.alpha |
transparency value for |
add |
logical. If |
... |
additional arguments passed to |
Returns invisibly the list of contours lines, with components levels
, x
, y
.
See contourLines
.
Michael Friendly
contourplot
from package lattice.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.