Learn R Programming

SciencesPo (version 1.4.0)

party_color_pal: Political Parties Color Palette (Discrete) and Scales

Description

An N-color discrete palette for political parties.

Usage

party_color_pal(palette = "BRA", plot = FALSE, hex = FALSE)

Arguments

palette
the palette name, a character string.
plot
logical, if TRUE a plot is returned.
hex
logical, if FALSE, the associated color name (label) is returned.

See Also

Other color party: scale_color_party

Examples

Run this code
library(scales)

# Brazil
show_col(party_color_pal("BRA")(20))

# Argentine
show_col(party_color_pal("ARG")(12))

# US
show_col(party_color_pal("USA")(6))

# Canada
show_col(party_color_pal("CAN")(10))

party_color_pal("CAN", plot=TRUE, hex=FALSE)

Run the code above in your browser using DataLab