Learn R Programming

WRTDStidal (version 1.1.4)

gradcols: Get colors for plots

Description

Gets colors used for WRTDS plots

Usage

gradcols(col_vec = NULL)

Value

A character vector of colors in hexadecimal notation.

Arguments

col_vec

chr string of plot colors to use, typically passed to scale_colour_gradientn for shading. Any color palette from RColorBrewer can be used as a named input. Palettes from grDevices must be supplied as the returned string of colors for each palette.

Details

This is a convenience function for retrieving a color palette that is used by most of the plotting functions. Palettes from RColorBrewer will use the maximum number of colors. The default palette is 'Spectral'.

See Also

dynaplot, gridplot, wtsplot

Examples

Run this code

## defaults
gradcols()

## another RColorBrewer palette
gradcols('Pastel2')

## a silly example
gradcols(rainbow(7))

Run the code above in your browser using DataLab