MyNixOS website logo
Description

Palettes Inspired by the TV Show "The Witcher".

Plot your data using color palettes for 'ggplot2' inspired by the TV show, book series and video games "The Witcher".

thewitcher

cranversion rstudio mirror per-monthdownloads rstudio mirror totaldownloads

This is a package designed to implement color palettes inspired by the TV Show, book series and video games The Witcher into R and ggplot2.
The package draws some inspiration from the gameofthrones-package.
Most color palettes are inspired by the 3rd installation of the video games: The Witcher III - Wild Hunt

For questions or suggestions please contact me:

Email: [email protected]

Twitter: <img src="C:\Users\grafluca\AppData\Local\Temp\RtmpG6g9oo\file37c51af58da.png" style="height:1.4em" /

Installation

From Github:

# install.packages("devtools")
devtools::install_github("graflukas138/thewitcher")

From CRAN:

install.packages("thewitcher")

Palettes

thewitcher provides 30 different palettes. An overview can be viewed with the witcher_colors() function:

library(thewitcher)

witcher_colors()

Usage

An example of usage for the thewitcher - color scales. The default option is Geralt.

pal <- witcher(255, option = "Geralt")
image(volcano, col = pal)

How about a plot that is inspired by a Witcher school?

pal <- witcher(255, option = "school_griffin")
image(volcano, col = pal)

Or a monster?

pal <- witcher(255, option = "necrophage")
image(volcano, col = pal)

Or a witcher sign?

pal <- witcher(255, option = "axi")
image(volcano, col = pal)

ggplot2

thewitcher provides color scales and functions to use with ggplot2.
If ggplot2 is available you’ll have access to the scale_[colour|fill]_witcher() functions:

Continous data

ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
  geom_hex() + coord_fixed() +
  scale_fill_witcher(option="Geralt") + theme_bw()

ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
  geom_hex() + coord_fixed() +
  scale_fill_witcher(option="Ciri") + theme_bw()

ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
  geom_hex() + coord_fixed() +
  scale_fill_witcher(option="wildhunt") + theme_bw()

ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
  geom_hex() + coord_fixed() +
  scale_fill_witcher(option="leshen") + theme_bw()

Discrete data

Use scale_fill_witcher_d() to plot discrete data.

txsamp <- subset(txhousing, city %in%
  c("Houston", "Fort Worth", "San Antonio", "Dallas", "Austin"))

ggplot(txsamp, aes(x = median, fill = city)) +
  geom_histogram(position = "dodge", binwidth = 15000)+ scale_fill_witcher_d(option = "katakan")+ theme_bw()

Order of colors can be reversed using direction = -1.

txsamp <- subset(txhousing, city %in%
  c("Houston", "Fort Worth", "San Antonio", "Dallas", "Austin"))

ggplot(txsamp, aes(x = median, fill = city)) +
  geom_histogram(position = "dodge", binwidth = 15000)+ scale_fill_witcher_d(option = "katakan", direction = -1) + theme_bw()

“Evil is evil. Lesser, greater, middling… Makes no difference. The degree is arbitrary. The definition’s blurred. If I’m to choose between one evil and another… I’d rather not choose at all.” - Geralt of Rivia.

Metadata

Version

1.0.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows