Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dsdesrosiers/ghibli

 
 

Repository files navigation

ghibli

Made with 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

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

Palettes

# load package
library(ghibli)

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

Spirited Away

ghibli_palette("SpiritedMedium")

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 come from Love magazine's STUDIO GHIBLI FOREVER retrospective. Go check it.

About

Studio Ghibli colour palettes for R 🎌

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%