knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Joker

This package is based on Cianna Bedford-Petersen's package inauguration

joker is a toy R package to provide a color palette based on the Joker character played by:

Joaquin Phoenix in Joker 2019

Joaquin Phoenix

library(joker)
joker("phoneix")

Heath Ledger in The Dark Knight 2008

Joaquin Phoenix

library(joker)
joker("ledger")

Installation

You can install the development version of joker from GitHub with:

# install.packages("devtools")
devtools::install_github("ahmedmoustafa/joker")

Example

A barplot with the joker phoneix colors

library(joker)
library(ggplot2)

x = c("A", "B", "C", "D", "E")
y = c(50, 40, 30, 20, 10)

ggplot() +
  geom_bar(aes(x = x, y = y, fill = x), stat = "identity") +
  scale_fill_manual(values = joker("phoneix")) +
  ggtitle("Barplot with the Joker phoneix colors")

A barplot with the joker ledger colors

library(joker)
library(ggplot2)

x = c("A", "B", "C", "D", "E")
y = c(50, 40, 30, 20, 10)

ggplot() +
  geom_bar(aes(x = x, y = y, fill = x), stat = "identity") +
  scale_fill_manual(values = joker("ledger")) +
  ggtitle("Barplot with the Joker ledger colors")


ahmedmoustafa/joker documentation built on Jan. 30, 2021, 1:27 p.m.