A convenient wrapper around ggplot
to generate a formatted plot of a single raster.
Usage
oneRasterPlot(
rast,
land = NA,
landCol = "black",
scaleRange = NA,
graticule = TRUE,
title = "A Raster",
verbose = TRUE,
...
)
Value
A plot of mapping the values of the input raster layer
Arguments
rast
A single SpatRaster layer on a continuous
scale.
land
An optional coastline polygon shapefile
of types sf or SpatRaster 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.
graticule
logical. Do you want a grid of lon/lat lines?
title
A title for the plot.
verbose
logical. Switching to FALSE mutes message alerting
user if input rast values exceed a specified scaleRange.
...
Additional optional arguments to pass to
plot initial plot object or viridis.