Learn R Programming

RSurvey (version 0.7-0)

ChoosePalette: Set Color Palette

Description

A GUI for viewing or manipulating color palettes.

Usage

ChoosePalette(pal = diverge_hcl, n = 7L, parent = NULL)

Arguments

pal
function; the initial palette, see Value below.
n
integer; the number of colors in the palette.
parent
tkwin; the GUI parent window.

Value

  • Returns a function that takes an integer argument and returns that number of colors interpolating the given sequence.

Details

Computes palettes based on the HCL (polarLUV) color space.

References

Zeileis A., Hornik K., and Murrell P., 2009, Escaping RGBland: Selecting Colors for Statistical Graphics, Computational Statistics & Data Analysis, 53, p. 3259-3270.

See Also

rainbow_hcl

Examples

Run this code
pal <- ChoosePalette(terrain_hcl)
filled.contour(volcano, color.palette = pal, asp = 1)

Run the code above in your browser using DataLab