A convenient wrapper around spplot to generate a formatted plot of a single raster.

oneRasterPlot(
  rast,
  land = NA,
  landCol = "black",
  scaleRange = NA,
  title = "A Raster",
  ...
)

Arguments

rast

A single Raster* layer on a continuous scale.

land

An optional coastline polygon shapefile of type sf to provide geographic context for the occurrence points.

landCol

Color for land on map.

scaleRange

Optional numeric vector containing maximum and minimum values for color scale. Helpful when making multiple plots for comparison. Defaults to minimum and maximum of input rast.

title

A title for the plot.

...

Additional optional arguments to pass to spplot initial plot object or viridis.

Value

A plot of class trellis mapping the values of the input raster layer

See also

Examples

library(raster)
rast <- raster(ncol=10, nrow=10)
values(rast) <- seq(0,99, 1)

oneRasterPlot(rast = rast)