scale_colour_poke: Add a pokemon palette to a ggplot2 colour or fill scale.

Description Usage Arguments Details Examples

Description

Get a pokemon palette by either giving a pokemon number or name.

Usage

1
2
3
4
5
scale_colour_poke(..., pokemon = 1, spread = NULL)

scale_fill_poke(..., pokemon = 1, spread = NULL)

scale_color_poke(..., pokemon = 1, spread = NULL)

Arguments

...

Other arguments passed on to discrete_scale to control name, limits, breaks, labels and so forth.

pokemon

An integer or character pokemon name

spread

How many, quite distinct, colours should be returned. See details.

Details

If spread is given an integer, the full palette is clustered into that many groups (ward clustering in HSV space). The most common colour in each cluster is then returned. It is hoped this will give a good balance between reflecting the pokemons colouring while giving relatively distinct colours.

Examples

1
2
3
library(ggplot2)
qplot(Sepal.Length, Sepal.Width, colour = Species, data=iris) +
 scale_colour_poke(pokemon = 'Metapod')

timcdlucas/palettetown documentation built on May 31, 2019, 1:48 p.m.