https://github.com/timcdlucas/palettetown
Pokemon themed colour schemes for R.
https://github.com/timcdlucas/palettetown
colour-schemes palettes pokemon
Last synced: 8 months ago
JSON representation
Pokemon themed colour schemes for R.
- Host: GitHub
- URL: https://github.com/timcdlucas/palettetown
- Owner: timcdlucas
- License: other
- Created: 2015-08-12T16:48:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T10:33:09.000Z (almost 9 years ago)
- Last Synced: 2025-10-22T05:58:37.067Z (8 months ago)
- Topics: colour-schemes, palettes, pokemon
- Language: R
- Size: 1.53 MB
- Stars: 70
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
palettetown
======
[](http://cranlogs.r-pkg.org/badges/grand-total/palettetown/index.html)
[](https://travis-ci.org/timcdlucas/palettetown)
An R package providing pokemon colour palettes.
This package is very much inspired by [pokepalletes](http://pokepalettes.com/#charizard).
Note that Pokemon, pokedex and all pokemon names are trademarks of Nintendo. I own nothing.
Installation
-------------
### To install from CRAN
```{r installCRAN, echo = TRUE, eval = FALSE}
install.packages('palettetown')
library(palettetown)
```
### To install development version
```{r install, echo = TRUE, eval = FALSE}
library(devtools)
install_github('timcdlucas/palettetown')
library(palettetown)
```
Usage
------
### See palettes
```{r lib, eval = TRUE, echo = FALSE}
library(palettetown)
set.seed(10)
```
```{r pokedex, eval = TRUE, echo = TRUE}
# Show ten of the better palettes
pokedex()
# Show ten palettes starting from pokemon #155
# Get 7 fairly distinct colours for each.
pokedex(155, 7)
# Show ten palettes starting from Metapod
pokedex('Metapod')
# Show ten palettes that are fairly colour blind friendly
pokedex(cb = 1)
```
### Base graphics
```{r base}
plot(rnorm(20), rnorm(20), col = pokepal(pokemon = 137, spread = 6), pch = 16, cex = 1.8)
```
### ggplot2
```{r 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)
qplot(factor(carb), data=mtcars, geom="bar",
fill = factor(carb)) +
scale_fill_poke(pokemon = 'Quilava', spread = 6)
```