rsm.lm
image(x, ...) image(x, y, z, zlim=range(z), add=F)
z
is
evaluated.
The values should be in increasing order; missing values are not accepted.
len(x)-1
by
len(y)-1
(or
len(x)
by
len(y)
)
giving surface height at x-y cell centers,
i.e.,
z[i,j]
is evaluated at
(x[i]+x[i+1])/2
,
(y[i]+y[i+1])/2
(or x-y points, i.e.,
z[i,j]
is evaluated at
x[i]
,
y[j]
).
The rows of
z
are indexed by
x
, and the columns by
y
.
Missing values (
NA
s) are allowed.
x
,
y
, and
z
.
In particular, the result of
interp
is suitable as an argument to
image
.
z
matrix and vectors
x
and
y
are generated (
x
is 1:nrow(z),
y
is 1:ncol(z)). The result of
predict
together with
expand.grid
is
suitable as an argument to
image
.
z
values to plot.
The image will be drawn so that a value of
zlim[1]
is lightest (or the first
color) and
zlim[2]
is darkest (or the last color).
If a value of
z
is outside of the range of
zlim[1]
and
zlim[2]
it will not be plotted, that is, the position will be the background color.
TRUE
, causes image to be added to the current plot.
par
).
add
.
An error occurs if the current graphics device does not support the
image
command.
Not all plotting devices are able to make images.
See the
Devices
help file for a list of graphics devices that can use
image
.
You have the choice between specifying the edges of the cells or the
centers of the cells.
If you specify the centers, the edges will be placed halfway between
the centers and the outer edges will be placed as though
all the cells were the same sized.
It is generally more convenient to specify the cell centers,
but you may need to specify cell edges for more control over the picture,
especially if the grid points are not evenly spaced.
Some devices have difficulty overlaying image data on lines and text;
try plotting the image data first.
rx <- range(ozone.xy$x) ry <- range(ozone.xy$y) usa(xlim=rx, ylim=ry, lwd=2, col=2) i <- interp(ozone.xy$x, ozone.xy$y, ozone.median) image(i, add=T) text(ozone.xy, ozone.median) title(main="Median Ozone Concentrations in the North East")