get_palette: Retrieve the color scheme for contour plots.

Description Usage Arguments Value See Also Examples

View source: R/util.R

Description

Retrieve the color scheme for contour plots.

Usage

1
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

plotsurface, gradientLegend

Other Utility functions: findAbsMin(), find_n_neighbors(), firstLetterCap(), getArrowPos(), getDec(), getRange(), getRatioCoords(), group_sort(), inch2coords(), isColor(), list2str(), move_n_point(), orderBoxplot(), se(), sortGroups()

Examples

1
2
3
4
5
6
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)

plotfunctions documentation built on April 28, 2020, 5:10 p.m.