col.scale: col.scale

col.scaleR Documentation

col.scale

Description

Assigns rgb colors to numeric data values in vector "x".. maps scalar values in val.range (default c(0,1)) to a linear color scale of between col.min (default white) and col.max (default black), each which are length 3 vectors or characters. RGB values are scaled between 0 and 1.

Values below and above val.min and val.max are mapped to col.max and col.max respectively

Assigns rgb colors to numeric data values in vector "x".. maps scalar values in val.range (default c(0,1)) to a linear color scale of between col.min (default white) and col.max (default black), each which are length 3 vectors or characters. RGB values are scaled between 0 and 1.

Values below and above val.min and val.max are mapped to col.max and col.max respectively

Assign rgb colors to numeric data

Assigns rgb colors to numeric data values in vector "x".. maps scalar values in val.range (default c(0,1)) to a linear color scale of between col.min (default white) and col.max (default black), each which are length 3 vectors or characters. RGB values are scaled between 0 and 1. Values below and above val.min and val.max are mapped to col.max and col.max respectively

Usage

col.scale(
  x,
  val.range = c(0, 1),
  col.min = "white",
  col.max = "black",
  na.col = "white",
  invert = F
)

col.scale(
  x,
  val.range = c(0, 1),
  col.min = "white",
  col.max = "black",
  na.col = "white",
  invert = F
)

col.scale(
  x,
  val.range = c(0, 1),
  col.min = "white",
  col.max = "black",
  na.col = "white",
  invert = F
)

Arguments

x

length n numeric or integer data to color

val.range

data range to assign to colors (= c(0,1))

col.min

character color to interpolate minimum value in val.range (='white')

col.max

character color interpolate maximum value in val.range (='black')

na.col

color to give to na.values (='white')

invert

logical flag whether to flip min and max (=FALSE)

Value

length n vector of colors

length n vector of colors

Author(s)

Marcin Imielinski

Marcin Imielinski

Marcin Imielinski


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.