Skip to contents

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.

scale_fill_whitebox_*

Check scale_fill_whitebox_c() for more info.

scale_fill_hypso_*

Check scale_fill_hypso_c() for more info.

scale_fill_cross_blended_*

Check scale_fill_cross_blended_c() for more info.