The length of x
should be equal to the nrow(z)+1
or
nrow(z)
. In the first case x
specifies the boundaries
between the cells: in the second case x
specifies the midpoints
of the cells. Similar reasoning applies to y
. It probably
only makes sense to specify the midpoints of an equally-spaced
grid. If you specify just one row or column and a length-one x
or y
, the whole user area in the corresponding direction is
filled. For logarithmic x
or y
axes the boundaries between
cells must be specified.
Rectangles corresponding to missing values are not plotted (and so are
transparent and (unless add = TRUE
) the default background
painted in par("bg")
will show through and if that is
transparent, the canvas colour will be seen).
If breaks
is specified then zlim
is unused and the
algorithm used follows cut
, so intervals are closed on
the right and open on the left except for the lowest interval which is
closed at both ends.
The axes (where plotted) make use of the classes of xlim
and
ylim
(and hence by default the classes of x
and
y
): this will mean that for example dates are labelled as
such.
Notice that image
interprets the z
matrix as a table of
f(x[i], y[j])
values, so that the x axis corresponds to row
number and the y axis to column number, with column 1 at the bottom,
i.e.a 90 degree counter-clockwise rotation of the conventional
printed layout of a matrix.
Images for large z
on a regular grid are rendered more
efficiently with useRaster = TRUE
and can prevent rare
anti-aliasing artifacts, but may not be supported by all graphics
devices. Some devices (such as postscript
and X11(type =
"Xlib")
) which do not support semi-transparent colours may emit
missing values as white rather than transparent, and there may be
limitations on the size of a raster image. (Problems with the
rendering of raster images have been reported by users of
windows()
devices under Remote Desktop, at least under its
default settings.)
The graphics files in PDF and PostScript can be much smaller under
this option.
If useRaster
is not specified, raster images are used when the
getOption("preferRaster")
is true, the grid is regular
and either dev.capabilities("rasterImage")$rasterImage
is "yes"
or it is "non-missing"
and there are no missing
values.