markushlang / elgreco

El Greco color palette for R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

El Greco Palettes

Palettes derived from El Greco paintings. I have only included color blind safe palettes.

Installation

devtools::install_github("markushlang/elgreco")

Usage

library("elgreco")
# See all palettes
names(elgreco_palettes)
#>  [1] "AndrewFrancis1" "AndrewFrancis2" "Annunciation1"  "Annunciation2" 
#>  [5] "Caridad1"       "Caridad2"       "Disrobing1"     "Disrobing2"    
#>  [9] "Immaculate1"    "Immaculate2"    "Laocoon1"       "Laocoon2"      
#> [13] "Marriage1"      "Marriage2"      "Shepherds1"     "Luke1"         
#> [17] "Luke2"          "Toledo1"        "Toledo2"        "John1"         
#> [21] "John2"

Palettes

Andrew and Francis

elgreco_palette("AndrewFrancis1")

elgreco_palette("AndrewFrancis2")

library(ggplot2)

url <- "https://raw.githubusercontent.com/allisonhorst/penguins/master/data/penguins_size.csv"
penguins <- read.csv(url)

ggplot(penguins, aes(flipper_length_mm, body_mass_g, color = species)) +
  geom_jitter(size = 3) +
  scale_color_manual(values = elgreco_palette("AndrewFrancis1")) +
  theme_minimal() +
  labs(title="Penguin size, Palmer Station LTER",
       subtitle="Flipper length and body mass for Adelie, Chinstrap and Gentoo Penguins")

Annunciation

elgreco_palette("Annunciation1")

elgreco_palette("Annunciation2")

Caridad

elgreco_palette("Caridad1")

elgreco_palette("Caridad2")

Disrobing

elgreco_palette("Disrobing1")

elgreco_palette("Disrobing2")

Immaculate

elgreco_palette("Immaculate1")

elgreco_palette("Immaculate2")

Laocoon

elgreco_palette("Laocoon1")

elgreco_palette("Laocoon2")

Marriage

elgreco_palette("Marriage1")

elgreco_palette("Marriage2")

Shepherds

elgreco_palette("Shepherds1")

ggplot(penguins, aes(x = flipper_length_mm)) +
  geom_histogram(aes(fill = species), 
                 alpha = 0.85, 
                 position = "identity") +
  scale_fill_manual(values = elgreco_palette("Shepherds1")) +
  theme_minimal() +
  labs(x = "Flipper length (mm)",
       y = "Frequency",
       title = "Penguin flipper lengths")
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Luke

elgreco_palette("Luke1")

elgreco_palette("Luke2")

Toledo

elgreco_palette("Toledo1")

elgreco_palette("Toledo2")

John

elgreco_palette("John1")

elgreco_palette("John2")

Links

Citation (Dataset)

Gorman KB, Williams TD, Fraser WR (2014) Ecological Sexual Dimorphism and Environmental Variability within a Community of Antarctic Penguins (Genus Pygoscelis). PLoS ONE 9(3): e90081. doi:10.1371/journal.pone.0090081

About

El Greco color palette for R


Languages

Language:R 100.0%