Description Usage Arguments Value Author(s) Examples
View source: R/package_functions.R
The full list of colors of the palette are: blue = "#1c85e8", navy = "#1d2c4c", iris = "#ab80de", turquoise = "#68e1c7", citrine = "#ffc259", ruby = "#ff7f82", lightgrey = "#babcbc", bluegrey = "#7b9cb1", coolgrey = "#506d7e", warmgrey = "#525975", lightgreytint = "#f0f0f0".
1 2 |
palette |
A character string giving the name of one of the palattes ("main", "cool", "warm", "grey"). |
discrete |
A boolean(T, F) indicator setting whether to use a discrete or continuous theme. The default is F. |
reverse |
A boolean(T, F) indicator for whether to reverse the color palette. The default is F. |
addblack |
A boolean(T, F) indicator if want to add black to the color palatte. The default is F. |
n |
An optional numeric value specifying the number of discrete colors to include in the palette. |
colors |
An optional character vector of colors to use. |
A ggplot theme object
Alex Hubbard (hubbard.alex@gmail.com)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(ggplot2)
ggplot(iris) +
ggtitle("Title", subtitle = "Subtitle") +
geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
od_theme()
ggplot(iris) +
ggtitle("Title", subtitle = "Subtitle") +
geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
od_theme(n = length(unique(iris$Species)))
ggplot(iris) +
ggtitle("Title", subtitle = "Subtitle") +
geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
od_theme(colors = c("turquoise", "citrine", "iris"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.