vangogh"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "figure/",
  fig.height = 1
)

Vincent van Gogh Color Palettes

Introduction

The vangogh package (for use in R) consist of color scales extracted by Cheryl Isabella from a selection of Vincent van Gogh's paintings.

Installation

install.packages("vangogh")

Or the development version

devtools::install_github("cherylisabella/vangogh")

Usage

library("vangogh")

# See all palettes
names(vangogh_palettes)

# See all functions
lsf.str("package:vangogh")

Palettes and their associated artworks

The Starry Night (1889)

vangogh_palette("StarryNight")

Starry Night Over the Rhône / La Nuit étoilée (1888)

vangogh_palette("StarryRhone")

Self-portrait (1889)

vangogh_palette("SelfPortrait")

Café Terrace at Night (1888)

vangogh_palette("CafeTerrace")

The Church at Auvers (1890)

vangogh_palette("Eglise")

Irises / Les Iris (1889)

vangogh_palette("Irises")

Sunflowers - Munich version (1888)

vangogh_palette("SunflowersMunich")

Sunflowers - London version (1888)

vangogh_palette("SunflowersLondon")

Noon – Rest from Work (1890)

vangogh_palette("Rest")

Bedroom in Arles / Slaapkamer te Arles (1888)

vangogh_palette("Bedroom")

The Night Café / Le Café de nuit (1888)

vangogh_palette("CafeDeNuit")

Van Gogh's Chair (1888)

vangogh_palette("Chaise")

Shoes (1886)

vangogh_palette("Shoes")

Landscape with Houses (1890)

vangogh_palette("Landscape")

Wheat Field with Cypresses (1889)

vangogh_palette("Cypresses")

Examples

Discrete palette examples using ggplot2

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"))

Continuous palette examples

Generate a continuous palette from the given discrete palettes

x <- vangogh_palette("Chaise", 1000, "continuous")
x

Heatmap examples

oldpar <- par(mar = c(1, 1, 1, 1))
par(mar = c(1, 1, 1, 1))
pal <- vangogh_palette("SunflowersLondon", 21, type = "continuous")
image(volcano, col = pal)
par(oldpar)
ggplot(faithfuld) +
  aes(waiting, eruptions, fill = density) + 
  geom_tile() + 
  scale_color_manual(values = vangogh_palette("CafeTerrace")) 

scale_colour_vangogh() and scale_fill_vangogh() examples

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")


Try the vangogh package in your browser

Any scripts or data that you put into this service are public.

vangogh documentation built on May 27, 2022, 9:12 a.m.