colors: Color tools and palettes for epicontacts

Description Usage Arguments Details Author(s) Examples

Description

These functions are used for defining palettes or colors in the epicontacts package. They include:

Usage

1
2
3
4
5
6
7
8
9
transp(col, alpha = 0.5)

edges_pal(n)

cases_pal(n)

spectral(n)

fac2col(x, pal = cases_pal, NA_col = "lightgrey", legend = FALSE)

Arguments

col

A color vector to which transparency should be added.

alpha

The threshold to be used for transparency: 0 for full transparency, and 1 for full opacity.

n

An integer indicating the number of colors.

x

A character or a factor to be converted to colors.

pal

A color palette.

NA_col

The color to be used for NA values.

legend

A logical indicating if legend info should be added to the output. If TRUE, the output will be a list, with colors in the $color component.

Details

Author(s)

Thibaut Jombart [email protected]

Examples

1
2
barplot(1:5, col = cases_pal(5))
barplot(1:50, col = cases_pal(50))

epicontacts documentation built on May 2, 2019, 11:29 a.m.