“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 。◕‿‿◕。
Install the latest stable version on CRAN...
install.packages('ghibli')
...or 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")
# load package
library(ghibli)
# see palette names and colours
par(mfrow=c(9,3))
for(i in names(ghibli_palettes)) print(ghibli_palette(i))
ghibli_palette("SpiritedMedium")
ghibli_palette("TotoroMedium")
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 mostly come from Love magazine's STUDIO GHIBLI FOREVER retrospective. Kiki's Delivery Service and My Neighbor Totoro palettes come from Movies in Color. Go check 'em.