| get_palette {plotfunctions} | R Documentation |
Retrieve the color scheme for contour plots.
Description
Retrieve the color scheme for contour plots.
Usage
get_palette(color, nCol = 50, col = NULL)
Arguments
color |
A string, or vector of strings, indicating a color palette. Includes: 'topo', 'heat', 'bwr', 'cm', 'terrain', 'bpy', 'gray', 'bw', or user defined colors. |
nCol |
The number of colors to use in color schemes. |
col |
Color of contour lines for the contour plots. If NULL (default), a color is determined, depending on the color palette. |
Value
Color palette.
See Also
Other Utility functions:
findAbsMin(),
find_n_neighbors(),
firstLetterCap(),
getArrowPos(),
getDec(),
getRange(),
getRatioCoords(),
group_sort(),
inch2coords(),
isColor(),
list2str(),
move_n_point(),
orderBoxplot(),
se(),
sortGroups()
Examples
pal <- get_palette('terrain', nCol=10)
names(pal)
image(matrix(1:10, ncol=10), col=pal$color, axes=FALSE)
# user defined color palette:
pal <- get_palette(c('green', 'orange', 'red'))
image(matrix(1:10, ncol=10), col=pal$color, axes=FALSE)
[Package plotfunctions version 1.4 Index]