“No matter how many weapons you have, no matter how great your technology might be, the world cannot live without love!” —Castle in the Sky (1986)
。◕‿‿◕。 Sprinkle some Studio Ghibli palette magic over your plots 。◕‿‿◕。
Install the latest stable version on CRAN…
install.packages('ghibli')
…or get the development version from GitHub.
# install package from github
remotes::install_github("ewenme/ghibli")
ghibli
provides 9 unique palettes, with a light, medium and dark
variant for each.
# load package
library(ghibli)
# display palettes w/ names
par(mfrow=c(9,3))
for(i in names(ghibli_palettes)) print(ghibli_palette(i))
N.B. the palettes are exposed in YAML format for easier porting to new libraries.
All colour palettes are stored as color
objects (courtesy of the
prismatic
package) inside ghibli_palettes
with extremely cute printing (if
crayon is installed) and plotting
methods to help you preview flavours.
ghibli
provides relevant scales for use with ggplot2
. It only
suggests ggplot2
in order to stay lightweight, but if available you
can use the scale_[colour|fill]_ghibli_[c|d]()
functions:
library(ggplot2)
# ggplot stuff
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_jitter(size = 3) +
theme_minimal() +
# ghibli stuff
scale_colour_ghibli_d("LaputaMedium", direction = -1)
citation(package = 'ghibli')
wesanderson
packageAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.