
Convert RasterLayer into data.frame of colors that can be used for plotting
raster_colors-RasterLayer-method.Rd
This function is used internally by plot_layer
to convert a
RasterLayer object to a data.frame of colors for each pixel that can be used
for plotting with ggplot2
Usage
# S4 method for class 'RasterLayer'
raster_colors(x)
Examples
if (FALSE) { # \dontrun{
wi_landcover <- get_map_layer(wi_landcover_url, wis_poly)
wi_landcover_data <- raster_colors(wi_landcover)
} # }