scale_colour_poke {palettetown} | R Documentation |
Add a pokemon palette to a ggplot2 colour or fill scale.
Description
Get a pokemon palette by either giving a pokemon number or name.
Usage
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 |
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
library(ggplot2)
qplot(Sepal.Length, Sepal.Width, colour = Species, data=iris) +
scale_colour_poke(pokemon = 'Metapod')
[Package palettetown version 0.1.1 Index]