waRhol is an R package containing colour palettes inspired by the paintings of Andy Warhol. It can be directly integrated with ggplot and base R plotting.
You can install the development version of waRhol from GitHub with:
# install.packages("devtools")
devtools::install_github("alexskeels/waRhol")
Here are the palettes:
library(waRhol)
library(ggplot2)
pal_names <- names(warhol_palettes)
par(mfrow=c(length(warhol_palettes)/2, 2), lheight = 2, mar=rep(1, 4), adj = 0)
for (i in 1:length(warhol_palettes)){
viz_palette(warhol_palettes[[i]], pal_names[i])
}
viz_palette(warhol_palettes[["skull_76_1"]])
viz_palette(warhol_palettes[["skull_76_2"]])
viz_palette(warhol_palettes[["skull_77"]])
viz_palette(warhol_palettes[["skull_86"]])
viz_palette(warhol_palettes[["marilyn_orange_62"]])
viz_palette(warhol_palettes[["marilyn_green_62"]])
viz_palette(warhol_palettes[["marilyn_67"]])
viz_palette(warhol_palettes[["camo_87_1"]])
viz_palette(warhol_palettes[["camo_87_2"]])
viz_palette(warhol_palettes[["camo_87_3"]])
viz_palette(warhol_palettes[["camo_87_4"]])
viz_palette(warhol_palettes[["camo_87_5"]])
viz_palette(warhol_palettes[["bighorn_ram_83"]])
viz_palette(warhol_palettes[["basquiat_85"]])
viz_palette(warhol_palettes[["the_big_c_86"]])
Example of a discrete palette in ggplot
ggplot(diamonds) +
geom_bar(aes(x = cut, fill = clarity)) +
theme_light()+
scale_fill_warhol(palette="bighorn_ram_83")
Example of a continuous palette in ggplot
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = hp), size=2) +
scale_colour_warhol(palette="camo_87_1", discrete = FALSE)+
theme_light()
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = hp), size=2) +
scale_colour_warhol(palette="marilyn_orange_62", discrete = FALSE)+
theme_light()
Example of a continuous palette in base R
par(mfrow=c(1,1))
pal <- colorRampPalette(warhol_palettes[["skull_76_2"]])
image(volcano, col = pal(20))