powered by
This is intended for use with RGB(A) rasters (e.g., georeferenced imagery or photos). To work with bands as if they were columns, use df_spatial and geom_raster.
# S3 method for Raster layer_spatial(data, mapping = NULL, interpolate = TRUE, is_annotation = FALSE, lazy = FALSE, dpi = 150, ...)# S3 method for Raster annotation_spatial(data, mapping = NULL, interpolate = TRUE, ...)StatSpatialRasterStatSpatialRasterAnnotationStatSpatialRasterDfGeomSpatialRaster
# S3 method for Raster annotation_spatial(data, mapping = NULL, interpolate = TRUE, ...)
StatSpatialRaster
StatSpatialRasterAnnotation
StatSpatialRasterDf
GeomSpatialRaster
A Raster object
Currently, only RGB or RGBA rasters are supported. In the future, one may be able to map specific bands to the fill and alpha aesthetics.
Interpolate resampling for rendered raster image
Lets raster exist without modifying scales
Delay projection and resample of raster until the plot is being rendered
if lazy = TRUE, the dpi to which the raster should be resampled
Passed to other methods
A ggplot2 layer
An object of class StatSpatialRaster (inherits from Stat, ggproto, gg) of length 3.
Stat
ggproto
gg
# NOT RUN { load_longlake_data() ggplot() + layer_spatial(longlake_osm) ggplot() + layer_spatial(longlake_depth_raster) + scale_fill_continuous(na.value = NA) # }
Run the code above in your browser using DataLab