Learn R Programming

canprot (version 1.0.0)

get_colors: Get Colors

Description

Get colors for rank-difference (potential) diagrams.

Usage

get_colors(x, max50 = FALSE)

Arguments

x

numeric values

max50

logical, use most intense color for all values >= 50?

Details

get_colors returns a diverging (blue - light gray - red) color scale. Blue and red colors are associated with negative and positive values, respectively. The intensity of the color increases with the magnitude of the value. For accurate representation, the values should be in a percent scale (i.e. the maximum absolute value is not greater than 100). By default, a value of +/- 100 corresponds to greatest intensity. Set max50 to TRUE to compress the scale so that greatest intesity is obtained at values of +/- 50 and higher.

See Also

These colors are used in rankplot. The colors were precomputed using colorspace::diverge_hcl.