tell us
This package allows users to style their graphs with the same palettes as Wes Anderson movies. The wesanderson() package includes colour palettes from a range of Wes Anderson movies from Moonrise Kingdom to Fantastic Mr. Fox to Isle of Dogs, and more.
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.4 ✓ purrr 0.3.4
## ✓ tibble 3.1.2 ✓ dplyr 1.0.6
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library("wesanderson")get some data
library(palmerpenguins)use the function
plot <- ggplot(penguins, aes(factor(species), fill = factor(species))) + geom_bar() + scale_fill_manual(values = wes_palette("FantasticFox1"))
print(plot)more resources
There are other packages which also come with different colour palettes such as (ggsci)[https://cran.r-project.org/web/packages/ggsci/vignettes/ggsci.html] which comes with colour palettes inspired by famous scientific journals such as the Lancet. Documentation for the wesanderson package can be found (here)[https://github.com/karthik/wesanderson]