image: SpatRaster image method

imageR Documentation

SpatRaster image method

Description

Plot (make a map of) the values of a SpatRaster via image. See plot if you need more fancy options such as a legend.

Usage

## S4 method for signature 'SpatRaster'
image(x, y=1, maxcell=500000, ...)

Arguments

x

SpatRaster

y

positive integer indicating the layer to be plotted, or a character indicating the name of the layer

maxcell

positive integer. Maximum number of cells to use for the plot

...

additional arguments as for graphics::image

See Also

plot

Examples

 
f <- system.file("ex/elev.tif", package="terra") 
r <- rast(f)
image(r)
image(r, col=rainbow(24))

terra documentation built on Oct. 13, 2023, 5:08 p.m.