cross_blended_hypsometric_tints_db {tidyterra}R Documentation

Cross-blended hypsometric tints

Description

A tibble including the color map of 4 gradient palettes. All the palettes includes also a definition of colors limits in terms of elevation (meters), that can be used with ggplot2::scale_fill_gradientn().

Format

A tibble of 41 rows and 6 columns. with the following fields:

pal

Name of the palette.

limit

Recommended elevation limit (in meters) for each color.

r

Value of the red channel (RGB color mode).

g

Value of the green channel (RGB color mode).

b

Value of the blue channel (RGB color mode).

hex

Hex code of the color.

Details

From Patterson & Jenny (2011):

More recently, the role and design of hypsometric tints have come under scrutiny. One reason for this is the concern that people misread elevation colors as climate or vegetation information. Cross-blended hypsometric tints, introduced in 2009, are a partial solution to this problem. They use variable lowland colors customized to match the differing natural environments of world regions, which merge into one another.

Source

Derived from:

See Also

scale_fill_cross_blended_c()

Other datasets: grass_db, hypsometric_tints_db, princess_db, volcano2

Examples



data("cross_blended_hypsometric_tints_db")

cross_blended_hypsometric_tints_db

# Select a palette
warm <- cross_blended_hypsometric_tints_db %>%
  filter(pal == "warm_humid")

f <- system.file("extdata/asia.tif", package = "tidyterra")
r <- terra::rast(f)

library(ggplot2)

p <- ggplot() +
  geom_spatraster(data = r) +
  labs(fill = "elevation")

p +
  scale_fill_gradientn(colors = warm$hex)

# Use with limits
p +
  scale_fill_gradientn(
    colors = warm$hex,
    values = scales::rescale(warm$limit),
    limit = range(warm$limit),
    na.value = "lightblue"
  )


[Package tidyterra version 0.6.1 Index]