Learn R Programming

countries (version 1.2.0)

palettes_countries: Discrete colour palettes

Description

This function provides access to the discrete colours palettes used in this packages' 11 themes.

Usage

palettes_countries(n, theme = 1, reverse = FALSE)

Value

Returns n colours from the requested theme

Arguments

n

Number of desired colours

theme

A numeric value or name identifying the theme's colours. Can be a number between 1 and 11, or one of the theme's names: c("Default", "Greyscale", "Candy", "RedBlue", "Dark", "Reds", "Blues", "Greens", "Viridis", "Cividis", "Distinct", "Distinct2", "Paired").

reverse

Logical value indicating whether to reverse the order of the palette's colours Default is FALSE.

See Also

quick_map

Examples

Run this code
palettes_countries(5, theme = 1)

Run the code above in your browser using DataLab