ggColor: ggColor

Description Usage Arguments Value Examples

View source: R/Themes.R

Description

Generate hexadecimal values from R's default color wheel. Credit: https://stackoverflow.com/users/412342/john-colby

Usage

1

Arguments

n

(integer) The number of colors from the default color wheel you would like to return

Value

(character) Character vector of hexadecimal color values

Examples

1
2
3
4
5
6
temp <- data.frame(num = c(5, 7, 6, 4, 8), fac = factor(c("a", "a", "b", "b", "b")))
ggplot2::qplot(data = temp, x = num, fill = fac)
par(mfrow=c(1,2))
cls <- ggColor(2)
barplot(temp$num, col = cls[1])
barplot(temp$num, col = cls[2])

yogat3ch/HDA documentation built on Sept. 13, 2019, 8:54 p.m.