R
Switch branches/tags
Nothing to show
Clone or download
Latest commit e1c4c50 Dec 10, 2017
Permalink
Failed to load latest commit information.
R tortoro fix Dec 5, 2017
figure rm svg figs Dec 10, 2017
man palette length documentation Dec 5, 2017
packrat new palettes Dec 5, 2017
revdep add revdep checks Dec 5, 2017
vignettes vignettes build Aug 11, 2017
.Rbuildignore update rbuildignore Dec 5, 2017
.Rhistory new palettes Dec 5, 2017
.Rprofile init commit Aug 3, 2017
.gitignore prepare for release Aug 11, 2017
.travis.yml try travis Aug 3, 2017
DESCRIPTION add dev ver no. Dec 5, 2017
LICENSE add license file Aug 3, 2017
NAMESPACE try travis Aug 3, 2017
NEWS updated news Dec 5, 2017
README.Rmd add badges Dec 10, 2017
README.md add badges Dec 10, 2017
cran-comments.md add revdep checks Dec 5, 2017
ghibli.Rproj init commit Aug 3, 2017
ghibli.jpg write readme Aug 3, 2017

README.md

ghibli

Build Status CRAN status DLs

“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 。◕‿‿◕。

Installation

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")

Palettes

# load package
library(ghibli)

# see palette names and colours
par(mfrow=c(9,3))
for(i in names(ghibli_palettes)) print(ghibli_palette(i))

Spirited Away

ghibli_palette("SpiritedMedium")

My Neighbor Totoro

ghibli_palette("TotoroMedium")

Princess Mononoke

ghibli_palette("MononokeMedium")

When Marnie Was There

ghibli_palette("MarnieMedium1")

Ponyo

ghibli_palette("PonyoMedium")

Usage

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")

Credits

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.