plot | R Documentation |
ggplot
This function plots objects of class SpatRaster
, RasterLayer
, RasterBrick
or RasterStack
as ggplot2
. It is used internally by basemap*
functions that return ggplot
plots.
gg_raster(r, r_type = "RGB", gglayer = F, ...)
r |
raster of class |
r_type |
character, either |
gglayer |
logical, if |
... |
additional arguments, including
|
A ggplot2
object
library(basemaps)
# example extent
data(ext)
## Not run:
# raster object: Brick
map <- basemap_raster(ext)
# plotting RasterBrick
gg_raster(map, r_type = "RGB")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.