Closed aloboa closed 1 year ago
Given:
#using terra v <- values(rast(RStoolbox::rlogo)) k <- kmeans(v,4) c <- rast(RStoolbox::rlogo)[[1]] values(c) <- k$cluster ggR(c, geom_raster=TRUE) + scale_fill_brewer(palette = "Set1") Error: Continuous value supplied to discrete scale
and have to use, eg:
ggR(c, geom_raster=TRUE) + scale_fill_gradientn(colours = terrain.colors(4))
Is there a way to actually use qualitative color palettes with classified rasters?
The problem is when I use as.factor() with my data. Not an issue here either.
Given:
and have to use, eg:
Is there a way to actually use qualitative color palettes with classified rasters?