MapToColors: Construct color scale for a numeric value

View source: R/colorscales.R

MapToColorsR Documentation

Construct color scale for a numeric value

Description

Construct color scale for a numeric value

Usage

MapToColors(
  x,
  min.x = if (length(x) == 1) 1 else min(x),
  max.x = max(x),
  mid.x = NULL,
  min.color = "white",
  mid.color = "Displayr grey",
  max.color = "Displayr blue"
)

Arguments

x

A numeric vector specifying the colors returne

min.x

A numeric value representing the smallest value on the color scale. Values in x smaller than this will be treated as min.x.

max.x

A numeric value representing the largest value on the color scale. Values in x larger than this will be treated as max.x.

mid.x

A numeric value representing the midpoint on the color scale.

min.color

The color representing the smallest value.

mid.color

The color representing the mid point on the color scale.

max.color

The color representing the max point on the color scale.


Displayr/flipChartBasics documentation built on Feb. 26, 2024, 12:35 a.m.