Skip to content

timcdlucas/palettetown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

palettetown

Total Downloads Build Status

An R package providing pokemon colour palettes.

This package is very much inspired by pokepalettes.

Note that Pokemon, pokedex and all pokemon names are trademarks of Nintendo. I own nothing.

Installation

To install from CRAN

install.packages('palettetown')
library(palettetown)

To install development version

library(devtools)
install_github('timcdlucas/palettetown')
library(palettetown)

Usage

See palettes

# Show ten of the better palettes
pokedex()

plot of chunk pokedex

# Show ten palettes starting from pokemon #155
# Get 7 fairly distinct colours for each.
pokedex(155, 7)

plot of chunk pokedex

# Show ten palettes starting from Metapod
pokedex('Metapod')

plot of chunk pokedex

# Show ten palettes that are fairly colour blind friendly
pokedex(cb = 1)

plot of chunk pokedex

Base graphics

plot(rnorm(20), rnorm(20), col = pokepal(pokemon = 137, spread = 6), pch = 16, cex = 1.8)

plot of chunk base

ggplot2

# palettetown doesn't import ggplot2
library(ggplot2)


qplot(Sepal.Length, Sepal.Width, colour = Species, data=iris, size = 2) +
  scale_colour_poke(pokemon = 156, spread = 3)

plot of chunk ggplot2

qplot(factor(carb), data=mtcars, geom="bar", 
  fill = factor(carb)) +
  scale_fill_poke(pokemon = 'Quilava', spread = 6)

plot of chunk ggplot2