This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: rsm.lm
image(x, ...) image(x, y, z, zlim=range(z), add=F)
The first argument may be a list with components x, y, and z. In particular, the result of interp is suitable as an argument to image.
If the first argument is a matrix, it is assumed to be the 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.
Graphical parameters may also be supplied as arguments to this function (see par).
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")