show.colmat: show color matrix

Description Usage Arguments Details Value Author(s) Examples

View source: R/clusterluts.R

Description

Show colors represented in color vector cv as matrix of colored boxes.

Usage

1
show.colmat(cv, width = NULL, show.idx = FALSE, ...)

Arguments

cv

color vector (actually 3xn matrix with one column per color (RGB))

width

how many color tiles across (~sqrt(n) where n is the length of the color vector)

show.idx

add index to display

...

passed to rect

Details

By setting show.idx to TRUE, the index in the color vector is shown in the center of the color tiles. Assigning a vector the same length as cv, the elements of that vector will be shown rather than the index.

Value

none

Author(s)

Benno Pütz puetz@psych.mpg.de

Examples

1
2
3
4
op <- par(mfrow=c(2,1))
show.colmat(rainbow(12, end = 0.8))
show.colmat(rainbow(12, end = 0.8), width = 12)
par(op)

bennop/clusterLUTs documentation built on Nov. 21, 2020, 9:07 a.m.