Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/karthik/wesanderson
- Owner: karthik
- License: other
- Created: 2014-03-18T06:55:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-13T20:44:06.000Z (8 months ago)
- Last Synced: 2024-10-29T15:10:31.192Z (3 months ago)
- Topics: color-palette, data-visualization, plot, r, wes-anderson-palettes
- Language: R
- Size: 3.26 MB
- Stars: 1,938
- Watchers: 50
- Forks: 145
- Open Issues: 19
-
Metadata Files:
- Readme: README.Rmd
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codemeta: codemeta.json
Awesome Lists containing this project
- awesome-r-dataviz - wesanderson - A Wes Anderson color palette for R. (ggplot / Palettes 🎨)
- jimsghstars - karthik/wesanderson - A Wes Anderson color palette for R (R)
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)