Learn R Programming

rangeMapper (version 0.0-4)

tkColorPalette: Choose a color palette.

Description

Interactively choose a color palette.

Usage

tkColorPalette(pal, name, palette.size = 45, envir = .GlobalEnv)
tkMakeColorPalette(n)

Arguments

pal
pal a named list as e.g. returned by brewer.pal.get.
name
A quoted name to be assigned to envir.
palette.size
palette.size is the size of the tiles (tkbutton-s) in pixels.
envir
the environment to use.
n
length of the user-defined palette returned by {tkMakeColorPalette

Details

tkMakeColorPalette is called by tkColorPalette

See Also

colorRampPalette brewer.pal.get

Examples

Run this code
## These cannot be run by examples() but should be OK when pasted
## into an interactive R session 
pal =  c(brewer.pal.get(), list(heatcol = heat.colors (9),terraincol = terrain.colors(9), topocol = topo.colors(9) ))
 	
tkColorPalette(pal = pals, name  = "pal1")
tkColorPalette(pal = pals, name  = "pal2", palette.size = 17)
pal1
pal2

Run the code above in your browser using DataLab