R/colors_discrete.R
cmap_fill_discrete.Rd
Pick the function depending on the aesthetic of your ggplot object (fill or
color). See link{cmap_palettes}
for a listing of available gradients.
cmap_fill_discrete(palette = "prosperity", reverse = FALSE, ...)
cmap_color_discrete(palette = "prosperity", reverse = FALSE, ...)
cmap_colour_discrete(palette = "prosperity", reverse = FALSE, ...)
cmap_fill_discrete()
: For fill aesthetic
cmap_color_discrete()
: For color aesthetic
cmap_colour_discrete()
: For color aesthetic
ggplot(pop_and_laborforce_by_age, aes(x = variable, y = value, fill = age)) +
geom_col(position = position_stack(reverse = TRUE)) +
facet_wrap(~year) +
cmap_fill_discrete(palette = "community")
ggplot(percentile_wages, aes(x = percentile, y = wage, color = cluster)) +
geom_line() +
cmap_color_discrete(palette = "prosperity")