If no `col` is provided, the default image palette is used. The density
can be controlled with `n` and the mapping with the optional
`breaks`. If `breaks` is included as well as `n`, `n` is ignored.
function to generate colours, or a vector of hex colours
...
ignored
breaks
optionally used to specify colour mapping
n
optionally used to specify density of colours from `col` (ignored if `breaks` is set)
zlim
numeric range to clamp values to an absolute scale (ignored if `breaks` is set)
Details
The function `image_pal()` only returns hex character string colours. The function
`image_raster()` will map a raster of numeric values to an RGB 3-layer (channel) raster brick, and
`image_stars()` similarly for a 3-dimensional stars object.
Please note that the expansion to 3-channels is a fairly wasteful thing to do, the overall data is expanded
from a single layer to three but this faciliates a specific task of creating
textures for 3D mapping, and this is the only way to do it currently. It's also useful in
other situations, for controlling exactly the kind of plots we can achieve and for exporting
to image formats such as 'GeoTIFF' or 'PNG'.