scale_colour_land {khroma}R Documentation

AVHRR Global Land Cover Classification Color Scheme for ggplot2 and ggraph

Description

Provides the AVHRR Global Land Cover classification as modified by Paul Tol (colorblind safe).

Usage

scale_colour_land(..., lang = "en", aesthetics = "colour")

scale_color_land(..., lang = "en", aesthetics = "colour")

scale_fill_land(..., lang = "en", aesthetics = "fill")

scale_edge_colour_land(..., lang = "en")

scale_edge_color_land(..., lang = "en")

scale_edge_fill_land(..., lang = "en")

Arguments

...

Arguments passed on to ggplot2::discrete_scale().

lang

A character string specifying the language for the color names (see details). It must be one of "en" (english, the default), "fr" (french) or NULL. If not NULL, the values will be matched based on the color names.

aesthetics

A character string or vector of character strings listing the name(s) of the aesthetic(s) that this scale works with.

Details

Values will be matched based on the land classification names.

Value

A discrete scale.

Author(s)

N. Frerebeau

References

Tol, P. (2018). Colour Schemes. SRON. Technical Note No. SRON/EPS/TN/09-002, issue 3.1. URL: https://personal.sron.nl/~pault/data/colourschemes.pdf

See Also

Other themed color schemes: scale_colour_soil(), scale_colour_stratigraphy()

Other qualitative color schemes: scale_colour_soil(), scale_colour_stratigraphy(), scale_logical_discrete, scale_okabeito_discrete, scale_tol_bright, scale_tol_dark, scale_tol_discreterainbow, scale_tol_highcontrast, scale_tol_light, scale_tol_mediumcontrast, scale_tol_muted, scale_tol_pale, scale_tol_vibrant

Examples

library(ggplot2)

land <- data.frame(
  name = c(
    "water", "evergreen needleleaf forest", "deciduous needleleaf forest",
    "mixed forest", "evergreen broadleaf forest", "deciduous broadleaf forest",
    "woodland", "wooded grassland", "grassland", "cropland", "closed shrubland",
    "open shrubland", "bare ground", "urban and built"
  )
)

ggplot2::ggplot(land) +
  ggplot2::geom_rect(ggplot2::aes(xmin = rep(0, 14), xmax = rep(1, 14),
                                  ymin = 1:14, ymax = 1:14+1, fill = name)) +
  ggplot2::scale_y_reverse() +
  scale_fill_land(name = "land")

[Package khroma version 1.12.0 Index]