View source: R/killers_pallette.R
killers_pal | R Documentation |
Colour palette based on Iron Maiden's killers album sleeve.
killers_pal(n, type = c("discrete", "continuous"), reverse = FALSE)
scale_color_killers(n, type = "discrete", reverse = FALSE, ...)
scale_colour_killers(n, type = "discrete", reverse = FALSE, ...)
scale_fill_killers(n, type = "discrete", reverse = FALSE, ...)
n |
number of colors |
type |
discrete or continuous |
reverse |
reverse order, Default: FALSE |
... |
Arguments passed on to
|
library(scales)
show_col(killers_pal()(8))
library(discovr)
library(ggplot2)
# Get albums in the classic era from the discovr::eddiefy data.
# I'm not including fear of the dark because it's not in any way classic.
# No prayer for the dying was pushing its luck too if I'm honest.
classic_era <- subset(eddiefy, year < 1992)
# Plot some data and apply theme to color (note US English)
ggplot(classic_era, aes(x = energy, y = valence, color = album_name)) +
geom_point(size = 2) +
theme_minimal() +
scale_color_killers()
# Plot some data and apply theme to colour (note UK English)
ggplot(classic_era, aes(x = energy, y = valence, color = album_name)) +
geom_point(size = 2) +
theme_minimal() +
scale_colour_killers()
# Plot some data and apply theme to fill
ggplot(classic_era, aes(x = album_name, y = valence, fill = album_name)) +
geom_violin() +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90)) +
scale_fill_killers()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.