View source: R/palette_gameofthrones.R
westeros_pal | R Documentation |
Houses Stark, Lannister, Tyrell, Targaryen, Tully, Greyjoy, Manderly, Martell, Stannis Baratheon, & Arryn
westeros_pal( palette = "Stark", n, type = c("discrete", "continuous"), reverse = FALSE ) scale_color_westeros( palette = "Stark", n, type = "discrete", reverse = FALSE, ... ) scale_colour_westeros( palette = "Stark", n, type = "discrete", reverse = FALSE, ... ) scale_fill_westeros( palette = "Stark", n, type = "discrete", reverse = FALSE, ... )
palette |
name of palette, Default: "Stark" |
n |
number of colors |
type |
discrete or continuous |
reverse |
reverse order, Default: FALSE |
... |
Arguments passed on to
|
library(scales) show_col(westeros_pal(palette = "Stark")(5)) show_col(westeros_pal(palette = "Stannis")(5)) library(ggplot2) ggplot(airquality, aes(x = Day, y = Temp, group = as.factor(Month), color = as.factor(Month))) + geom_point(size = 2.5) + scale_color_westeros(palette = "Stark") ggplot(airquality, aes(x = Day, y = Temp, group = as.factor(Month), color = as.factor(Month))) + geom_point(size = 2.5) + scale_color_westeros(palette = "Stannis") ggplot(airquality, aes(x = Day, y = Temp, group = as.factor(Month), color = as.factor(Month))) + geom_point(size = 2.5) + scale_colour_westeros(palette = "Stannis") ggplot(mpg, aes(displ)) + geom_histogram(aes(fill = class), col = "black", size = 0.1) + scale_fill_westeros(palette = "Stannis")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.