contour.plot {mining} | R Documentation |
Create a filled or unfilled contour plot.
contour.plot(x,y,z,fill=F, levels=NULL,nlevels=if(is.null(levels)) 4 else length(levels), level.data=z, zlim,equal=F,pretty=T,lwd=2,drawlabels=F, color.palette=YlGnBu.colors,bg=grey(0.5), key=T,main="",...)
x,y |
locations at which the values in z are measured. |
z |
a matrix containing the values to be plotted (NAs are allowed). |
fill |
If TRUE , makes a filled contour plot. |
levels |
numeric vector of levels at which to draw contour
lines. The next few arguments only apply to the case when
levels==NULL . |
nlevels |
The number of contour lines to draw. |
level.data |
numeric vector to use for computing levels . |
zlim |
The range that the levels should cover. Defaults to the
range of level.data . |
equal |
If TRUE , the levels are equally spaced over
zlim . Otherwise they match the quantiles of
level.data . |
pretty |
If TRUE , the levels are chosen to be round numbers. |
lwd |
width of the contour lines. |
drawlabels |
If TRUE , the contour lines are labeled with
their level. |
color.palette |
a vector of colors, or a function which takes a number and returns a vector of that length. |
bg |
the background color. |
key |
If TRUE , a color key is drawn at the top of the
plot. If key==2 , the key of filled.contour
is used. |
main |
the title of the plot. |
... |
extra arguments passed to contour or
filled.contour . |
This is a wrapper function for contour
and
filled.contour
whose main purpose is to provide a
uniform interface and provide a decent automatic choice of levels.
If equal=FALSE
, the levels are chosen according to the
equal-count algorithm of break.quantile
.
Tom Minka
contour
,filled.contour
,
color.plot.loess
# see the examples for color.plot.loess