Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karthik/wesanderson

A Wes Anderson color palette for R
https://github.com/karthik/wesanderson

color-palette data-visualization plot r wes-anderson-palettes

Last synced: 5 days ago
JSON representation

A Wes Anderson color palette for R

Awesome Lists containing this project

README

        

---
output:
md_document:
variant: markdown_github
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "figure/",
fig.height = 1
)
```

# Wes Anderson Palettes

[![Build Status](https://travis-ci.org/karthik/wesanderson.png)](https://travis-ci.org/karthik/wesanderson)\
![CRAN Downloads](http://cranlogs.r-pkg.org/badges/wesanderson)

![](rushmore.jpg)

> I saved you from boring plots. What did you ever do? - Max Fischer (probably)

Tired of generic mass produced palettes for your plots? Short of adding an owl and dressing up your plot in a bowler hat, here's the most indie thing you can do to one. First round of palettes derived from the amazing Tumblr blog [Wes Anderson Palettes.](http://wesandersonpalettes.tumblr.com/)

## Installation

``` r
install.packages("wesanderson")
```

**Or the development version**

``` r
devtools::install_github("karthik/wesanderson")
```

## Usage

```{r, palettes_dummy}
library("wesanderson")

# See all palettes
names(wes_palettes)
```

## Palettes

### Bottle Rocket (1996)

```{r, bottlerocket1}
wes_palette("BottleRocket1")
wes_palette("BottleRocket2")
```

### Rushmore (1998)

```{r, rushmore}
wes_palette("Rushmore1")
```

### The Royal Tenenbaums (2001)

```{r, royal}
wes_palette("Royal1")
wes_palette("Royal2")
```

```{r, ggplot1, fig.height = 3}
library("ggplot2")
ggplot(mtcars, aes(factor(cyl), fill=factor(vs))) + geom_bar() +
scale_fill_manual(values = wes_palette("Royal1"))
```

### The Life Aquatic with Steve Zissou (2004)

```{r, lifeaquatic}
wes_palette("Zissou1")
```

```{r, volcano, fig.height = 3}
pal <- wes_palette("Zissou1", 21, type = "continuous")
image(volcano, col = pal)
```

```{r, zissou_heatmap, fig.height = 3}
pal <- wes_palette("Zissou1", 100, type = "continuous")
# heatmap is a local dataset
ggplot(heatmap, aes(x = X2, y = X1, fill = value)) +
geom_tile() +
scale_fill_gradientn(colours = pal) +
scale_x_discrete(expand = c(0, 0)) +
scale_y_discrete(expand = c(0, 0)) +
coord_equal()
```

### The Darjeeling Limited (2007)

```{r, darjeeling}
wes_palette("Darjeeling1")
wes_palette("Darjeeling2")
```

### Hotel Chevalier (2007)

```{r, chevalier}
wes_palette("Chevalier1")
```

### Fantastic Mr. Fox (2009)

```{r, fantasticfox}
wes_palette("FantasticFox1")
```

### Moonrise Kingdom (2012)

```{r, moonrise}
wes_palette("Moonrise1")
wes_palette("Moonrise2")
wes_palette("Moonrise3")
```

### Castello Cavalcanti (2013)

```{r, castello}
wes_palette("Cavalcanti1")
```

### The Grand Budapest Hotel (2014)

```{r, grandbudapest}
wes_palette("GrandBudapest1")
wes_palette("GrandBudapest2")
```

### The Isle of Dogs (2018)

```{r, isleofdogs}
wes_palette("IsleofDogs1")
wes_palette("IsleofDogs2")
```

### The French Distpatch (2021)

```{r}
wes_palette("FrenchDispatch")
```

### Asteroid City (2023)

```{r}
wes_palette("AsteroidCity1")
wes_palette("AsteroidCity2")
wes_palette("AsteroidCity3")
```

## As seen in these publications

- [The environmental niche of the global high seas pelagic longline fleet](http://advances.sciencemag.org/content/4/8/eaat3681) Science Advances 08 Aug 2018

![Imgur](https://i.imgur.com/gYKFwEc.jpg)

![Imgur](https://i.imgur.com/3Ztc5Qa.png)

- [Lopus, S., & Frye, M. (2018). Visualizing Africa's Educational Gender Gap. Socius: Sociological Research for a Dynamic World, 4, 237802311879595](http://journals.sagepub.com/doi/full/10.1177/2378023118795956)

![Imgur](https://i.imgur.com/0BVNi9g.jpg)