visColormap
is supposed to define a colormap. It returns a
function, which will take an integer argument specifying how many
colors interpolate the given colormap.
visColormap(colormap = c("bwr", "jet", "gbr", "wyr", "br", "yr", "rainbow", "wb", "heat", "terrain", "topo", "cm"))
palette.name
: a function that takes an integer argument
for generating that number of colors interpolating the given sequence
The input colormap includes:
# 1) define "blue-white-red" colormap palette.name <- visColormap(colormap="bwr") # 2) use the return function "palette.name" to generate 10 colors spanning "bwr" palette.name(10)[1] "#0000FF" "#3838FF" "#7171FF" "#AAAAFF" "#E2E2FF" "#FFE2E2" "#FFAAAA" [8] "#FF7171" "#FF3838" "#FF0000"