splot.colormean: splot color average

Description Usage Arguments Examples

View source: R/utils.R

Description

Calculates the average of a set of colors, returning its Hex code.

Usage

1

Arguments

...

color codes or names as characters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# average of red and blue
plot(
  1:3, numeric(3), pch = 15, cex = 20, xlim = c(0, 4),
  col = c('red', splot.colormean('red', 'blue'), 'blue')
)

# average of a set
x = rnorm(100)
set = splot.color(x, method = 'related')
splot(
  x ~ rnorm(100), colors = set,
  add = points(0, 0, pch = 15, cex = 10, col = splot.colormean(set))
)

splot documentation built on July 8, 2020, 6:52 p.m.

Related to splot.colormean in splot...