Learn R Programming

Tmisc (version 1.0.1)

gghues: Emulate ggplot2 default hues

Description

This will emulate ggplot2's hues, which are equally spaced hues around the color wheel, starting from 15.

Usage

gghues(n, start = 15)

Value

A vector of hues

Arguments

n

The Numeric; number of hues to generate.

start

Numeric; the place on the color wheel to start. ggplot2 default is 15.

Examples

Run this code
n <- 10
gghues(3)
barplot(rep(1,n), col=gghues(n), names=gghues(n))
barplot(rep(1,n), col=gghues(n, start=15+180), names=gghues(n, start=15+180))

Run the code above in your browser using DataLab