“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 R plots 。◕‿‿◕。
Get the development version from GitHub...
# If you haven't installed remotes yet, do so
install.packages("remotes")
# install package from github
remotes::install_github("ewenme/ghibli")...or get the CRAN edition.
install.packages("ghibli")# load package
library(ghibli)
# see palette names and colours
par(mfrow=c(7,3))
for(i in names(ghibli_palettes)) print(ghibli_palette(i))ghibli_palette("SpiritedMedium")ghibli_palette("MononokeMedium")ghibli_palette("MarnieMedium1")ghibli_palette("PonyoMedium")library("ggplot2")
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point(size = 3) +
scale_color_manual(values = rev(ghibli_palette("MarnieMedium1"))) +
theme_grey()ggplot(airquality, aes(x=Day, y=Month)) +
geom_tile(aes(fill=Temp)) +
scale_fill_gradientn(colours = ghibli_palette("MononokeMedium", 21, type = "continuous")) +
scale_x_discrete(expand = c(0, 0)) +
scale_y_discrete(expand = c(0, 0)) +
coord_equal() +
theme(legend.position = "top")This package was inspired by (and lots of code ported from) Karthik Ram's wesanderson package.
The palettes come from Love magazine's STUDIO GHIBLI FOREVER retrospective. Go check it.