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.

Session info

Details
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.2 (2023-10-31 ucrt)
#>  os       Windows Server 2022 x64 (build 20348)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language en
#>  collate  English_United States.utf8
#>  ctype    English_United States.utf8
#>  tz       UTC
#>  date     2024-02-06
#>  pandoc   2.19.2 @ C:/HOSTED~1/windows/pandoc/219~1.2/x64/PANDOC~1.2/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  bslib         0.6.1   2023-11-28 [1] RSPM
#>  cachem        1.0.8   2023-05-01 [1] RSPM
#>  class         7.3-22  2023-05-03 [3] CRAN (R 4.3.2)
#>  classInt      0.4-10  2023-09-05 [1] RSPM
#>  cli           3.6.2   2023-12-11 [1] RSPM
#>  codetools     0.2-19  2023-02-01 [3] CRAN (R 4.3.2)
#>  colorspace    2.1-0   2023-01-23 [1] RSPM
#>  data.table    1.15.0  2024-01-30 [1] RSPM
#>  DBI           1.2.1   2024-01-12 [1] RSPM
#>  desc          1.4.3   2023-12-10 [1] RSPM
#>  digest        0.6.34  2024-01-11 [1] RSPM
#>  dplyr         1.1.4   2023-11-17 [1] RSPM
#>  e1071         1.7-14  2023-12-06 [1] RSPM
#>  evaluate      0.23    2023-11-01 [1] RSPM
#>  fansi         1.0.6   2023-12-08 [1] RSPM
#>  farver        2.1.1   2022-07-06 [1] RSPM
#>  fastmap       1.1.1   2023-02-24 [1] RSPM
#>  fs            1.6.3   2023-07-20 [1] RSPM
#>  generics      0.1.3   2022-07-05 [1] RSPM
#>  ggplot2     * 3.4.4   2023-10-12 [1] RSPM
#>  glue          1.7.0   2024-01-09 [1] RSPM
#>  gtable        0.3.4   2023-08-21 [1] RSPM
#>  highr         0.10    2022-12-22 [1] RSPM
#>  htmltools     0.5.7   2023-11-03 [1] RSPM
#>  jquerylib     0.1.4   2021-04-26 [1] RSPM
#>  jsonlite      1.8.8   2023-12-04 [1] RSPM
#>  KernSmooth    2.23-22 2023-07-10 [3] CRAN (R 4.3.2)
#>  knitr         1.45    2023-10-30 [1] RSPM
#>  labeling      0.4.3   2023-08-29 [1] RSPM
#>  lifecycle     1.0.4   2023-11-07 [1] RSPM
#>  magrittr      2.0.3   2022-03-30 [1] RSPM
#>  memoise       2.0.1   2021-11-26 [1] RSPM
#>  munsell       0.5.0   2018-06-12 [1] RSPM
#>  pillar        1.9.0   2023-03-22 [1] RSPM
#>  pkgconfig     2.0.3   2019-09-22 [1] RSPM
#>  pkgdown       2.0.7   2022-12-14 [1] any (@2.0.7)
#>  proxy         0.4-27  2022-06-09 [1] RSPM
#>  purrr         1.0.2   2023-08-10 [1] RSPM
#>  R.cache       0.16.0  2022-07-21 [1] RSPM
#>  R.methodsS3   1.8.2   2022-06-13 [1] RSPM
#>  R.oo          1.26.0  2024-01-24 [1] RSPM
#>  R.utils       2.12.3  2023-11-18 [1] RSPM
#>  R6            2.5.1   2021-08-19 [1] RSPM
#>  ragg          1.2.7   2023-12-11 [1] RSPM
#>  Rcpp          1.0.12  2024-01-09 [1] RSPM
#>  rlang         1.1.3   2024-01-10 [1] RSPM
#>  rmarkdown     2.25    2023-09-18 [1] RSPM
#>  sass          0.4.8   2023-12-06 [1] RSPM
#>  scales        1.3.0   2023-11-28 [1] RSPM
#>  sessioninfo * 1.2.2   2021-12-06 [1] RSPM
#>  sf            1.0-15  2023-12-18 [1] RSPM
#>  stringi       1.8.3   2023-12-11 [1] RSPM
#>  stringr       1.5.1   2023-11-14 [1] RSPM
#>  styler        1.10.2  2023-08-29 [1] RSPM
#>  systemfonts   1.0.5   2023-10-09 [1] RSPM
#>  terra         1.7-71  2024-01-31 [1] RSPM
#>  textshaping   0.3.7   2023-10-09 [1] RSPM
#>  tibble        3.2.1   2023-03-20 [1] RSPM
#>  tidyr         1.3.1   2024-01-24 [1] RSPM
#>  tidyselect    1.2.0   2022-10-10 [1] RSPM
#>  tidyterra   * 0.5.2   2024-02-06 [1] local
#>  units         0.8-5   2023-11-28 [1] RSPM
#>  utf8          1.2.4   2023-10-22 [1] RSPM
#>  vctrs         0.6.5   2023-12-01 [1] RSPM
#>  withr         3.0.0   2024-01-16 [1] RSPM
#>  xfun          0.41    2023-11-01 [1] RSPM
#>  yaml          2.3.8   2023-12-11 [1] RSPM
#> 
#>  [1] D:/a/_temp/Library
#>  [2] C:/R/site-library
#>  [3] C:/R/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────