hdr_palette {weird}R Documentation

Color palette designed for plotting Highest Density Regions

Description

A sequential color palette is returned, with the first color being color, and the rest of the colors being a mix of color with increasing amounts of white. If prob is provided, then the mixing proportions are determined by prob (and n is ignored). Otherwise the mixing proportions are equally spaced between 0 and 1.

Usage

hdr_palette(n, color = "#00659e", prob = NULL)

Arguments

n

Number of colors in palette.

color

First color of vector.

prob

Vector of probabilities between 0 and 1.

Value

A function that returns a vector of colors of length length(prob) + 1.

Examples

hdr_palette(prob = c(0.5, 0.99))

[Package weird version 1.0.2 Index]