View source: R/visualizations.R
oneRasterPlot | R Documentation |
A convenient wrapper around ggplot
to generate a formatted plot of a single raster.
oneRasterPlot(
rast,
land = NA,
landCol = "black",
scaleRange = NA,
graticule = TRUE,
title = "A Raster",
verbose = TRUE,
...
)
rast |
A single |
land |
An optional coastline polygon shapefile
of types |
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 |
graticule |
|
title |
A title for the plot. |
verbose |
|
... |
Additional optional arguments to pass to
|
A plot of mapping the values of the input raster layer
viridis
ggplot
library(terra)
rast <- rast(ncol=10, nrow=10)
values(rast) <- seq(0,99, 1)
oneRasterPlot(rast = rast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.