The vangogh package (for use in R) consist of color scales extracted by Cheryl Isabella from a selection of Vincent van Gogh’s paintings.
install.packages("vangogh")
Or the development version
::install_github("cherylisabella/vangogh") devtools
library("vangogh")
# See all palettes
names(vangogh_palettes)
#> [1] "StarryNight" "StarryRhone" "SelfPortrait" "CafeTerrace"
#> [5] "Eglise" "Irises" "SunflowersMunich" "SunflowersLondon"
#> [9] "Rest" "Bedroom" "CafeDeNuit" "Chaise"
#> [13] "Shoes" "Landscape" "Cypresses"
# See all functions
lsf.str("package:vangogh")
#> scale_color_vangogh : function (..., palette = "StarryNight", discrete = TRUE, alpha = 1, reverse = FALSE)
#> scale_colour_vangogh : function (..., palette = "StarryNight", discrete = TRUE, alpha = 1, reverse = FALSE)
#> scale_fill_vangogh : function (..., palette = "StarryNight", discrete = TRUE, alpha = 1, reverse = TRUE)
#> vangogh_pal : function (palette = "StarryRhone", alpha = 1, reverse = FALSE)
#> vangogh_palette : function (name, n, type = c("discrete", "continuous"))
#> viz_palette : function (pal, ttl = deparse(substitute(pal)), num = length(pal))
vangogh_palette("StarryNight")
vangogh_palette("StarryRhone")
vangogh_palette("SelfPortrait")
vangogh_palette("CafeTerrace")
vangogh_palette("Eglise")
vangogh_palette("Irises")
vangogh_palette("SunflowersMunich")
vangogh_palette("SunflowersLondon")
vangogh_palette("Rest")
vangogh_palette("Bedroom")
vangogh_palette("CafeDeNuit")
vangogh_palette("Chaise")
vangogh_palette("Shoes")
vangogh_palette("Landscape")
vangogh_palette("Cypresses")
library("ggplot2")
ggplot(mtcars, aes(factor(cyl), fill=factor(vs))) + geom_bar() +
scale_fill_manual(values = vangogh_palette("SelfPortrait"))
ggplot(mtcars, aes(mpg, disp)) +
geom_point(aes(col = factor(gear)), size = 4) +
scale_color_manual(values = vangogh_palette("Cypresses"))
ggplot(iris) +
aes(Sepal.Length, Sepal.Width, color = Species) +
geom_point(size = 3) +
scale_color_manual(values = vangogh_palette("CafeDeNuit"))
Discrete palettes pick 1:n colors from the palette vector (n=5 for this package as 5 colors were curated for each palette)
Default color selection starts from colors at the extreme left and ends at the extreme right of the color palette.
<- vangogh_palette("Chaise", 1000, "continuous")
x x
colorRampPalette()
is used to a set of colors to create
a new continuous palette.<- par(mar = c(1, 1, 1, 1))
oldpar par(mar = c(1, 1, 1, 1))
<- vangogh_palette("SunflowersLondon", 21, type = "continuous")
pal image(volcano, col = pal)
par(oldpar)
ggplot(faithfuld) +
aes(waiting, eruptions, fill = density) +
geom_tile() +
scale_color_manual(values = vangogh_palette("CafeTerrace"))
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, color = class)) +
scale_colour_vangogh(palette="StarryRhone")
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
scale_fill_vangogh(palette = "StarryNight")