hue.range.split: Split a hue range according to 'split.tbl'

Description Usage Arguments Details Value Author(s) Examples

View source: R/clusterluts.R

Description

A hue range is defined by a lower and an upper hue bound, given either as 2-element vector or a 2xN matrix where each column defines such a range.

Usage

1
hue.range.split(hue.range, split.tbl, blank = 0.1, ...)

Arguments

hue.range

hue range vector or matrix

split.tbl

vector (possibly result of table) giving the weights of the splits (or list of such vectors applied to corresponding matrix colunm)

blank

which fraction of the range should be left blank

...

ignored

Details

The splits are defined by split.tbl, a vector giving the the relative weights (corresponding to "width" in colorspace) to be given to the individual splits.

The spacing between split ranges is defined by blank where a fraction of blank of the original range is divided among the splits. Thus, for an n-element vector split.tbl, each split covers blank/(n-1) of the range and the remaining "area" is dived among the n splits according to their weights speecified in split.tbl. See the examples.

In either case, blank is assumed to be a "global" parameter across all hue ranges.

Value

a hue range vector (only one split) or matrix

Author(s)

Benno Pütz puetz@psych.mpg.de

Examples

1
2
3
4
5
6
7
8
hm2 <- hue.range.split(c(0,5/6), 4:2) # matrix(c(0, 4,5,11,12,20)/24, nr = 2)
##           [,1]      [,2]      [,3]
## [1,] 0.0000000 0.2083333 0.5000000
## [2,] 0.1666667 0.4583333 0.8333333
hm3 <- hue.range.split(hm2, list(c(2,1,1), 3, c(1,1)))
##       [,1]       [,2]      [,3]      [,4] [,5]      [,6]
## [1,] 0.000 0.08333333 0.1291667 0.2083333 0.50 0.6833333
## [2,] 0.075 0.12083333 0.1666667 0.4333333 0.65 0.8333333

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