halpal: Color palettes using Halton sequences in CIE L*a*b* color...

Description Usage Arguments Value Examples

View source: R/halpal.R

Description

Color palettes using Halton sequences in CIE L*a*b* color space

Usage

1
2
3
4
5
6
7
8
halpal(n = 20, L_min = 45, L_max = 80, a_min = -60, a_max = 80,
  b_min = -60, b_max = 80)

scale_colour_halpal(...)

scale_color_halpal(...)

scale_fill_halpal(...)

Arguments

n

The number of colors to include in the palette.

L_min

The minimum value of L in the CIE L*a*b* color space.

L_max

The maximum value of L in the CIE L*a*b* color space.

a_min

The minimum value of a in the CIE L*a*b* color space.

a_max

The maximum value of a in the CIE L*a*b* color space.

b_min

The minimum value of b in the CIE L*a*b* color space.

b_max

The maximum value of b in the CIE L*a*b* color space.

...

Further arguments passed to 'halpal'.

Value

A vector of colors.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n <- 20
barplot(rep(1, n), col=tail(halpal(n+15), n), space=0, border=NA, axes=FALSE)

n <- 20
set.seed(123)
intercept <- runif(n, -5, 5)
slope <- -(intercept/5)*runif(n, 0, 1)
dat <- expand.grid(ID=paste0("ID:", 1:n), x=1:10)
dat$y <- intercept + dat$x*slope + runif(nrow(dat), 0, 3)
ggplot(dat, aes(x=x, y=y, color=ID)) + geom_line(size=1.3) +
  scale_color_halpal() + theme_bw()

benjaminrich/HalPalR documentation built on Dec. 23, 2019, 7:30 p.m.