Learn R Programming

SciencesPo (version 1.4.1)

party_pal: Political Parties Color Palette (Discrete) and Scales

Description

An N-color discrete palette for political parties.

Usage

party_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_pal("BRA")(20))

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

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

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

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

Run the code above in your browser using DataLab