Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

chooseColors

Create a list of colors from among a variety of color palettes.


Description

Create a list of colors from among a variety of color palettes.

Usage

chooseColors(pal = paletteChoices(), num, rev = FALSE, ...)

paletteChoices()

Arguments

pal

A character that is the name of a palette. Must be one of “rich”, “cm”, “default”, “grey”, “gray”, “heat”, “jet”, “rainbow”, “topo”, or “terrain”, which are given in paletteChoices.

num

The number of colors to be returned.

rev

A logical that indicates if the default order of colors should be reversed (=TRUE) or not (=FALSE).

...

Other arguments to the various palette functions.

Value

A vector of colors of length num.

Author(s)

Derek H. Ogle, derek@derekogle.com

See Also

Examples

n <- 20
# Color Wheels
pie(rep(1,n), col=chooseColors("rich",n))
pie(rep(1,n), col=chooseColors("rainbow",n))
pie(rep(1,n), col=chooseColors("topo",n))
pie(rep(1,n), col=chooseColors("gray",n))
pie(rep(1,n), col=chooseColors("jet",n))
# colors reversed order
pie(rep(1,n), col=chooseColors("jet",n,rev=TRUE))

FSA

Simple Fisheries Stock Assessment Methods

v0.8.32
GPL (>= 2)
Authors
Derek Ogle [aut, cre] (<https://orcid.org/0000-0002-0370-9299>), Powell Wheeler [aut], Alexis Dinno [aut] (Provided base functionality of dunnTest())
Initial release
2021-1-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.