
Gradient palettes in tidyterra
Diego Hernangómez
Source:vignettes/articles/palettes.Rmd
palettes.Rmd
This page shows a gallery of maps that can be displayed with the gradient fill scales included with tidyterra. A basic code to generate this map is:
library(tidyterra)
library(terra)
library(ggplot2)
r <- rast(system.file("extdata/volcano2.tif", package = "tidyterra"))
ggplot() +
geom_spatraster(data = r) +
# Use the palette you like, in this case:
scale_fill_hypso_c() +
theme_void()
scale_fill_terrain_*
and
scale_fill_wiki_*
Check scale_fill_terrain_c()
and
scale_fill_wiki_c()
for more info.