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

prettyGraphsColorSelection

Algorithmically select colors from prettyGraphs


Description

This function uses prime numbers to select colors from prettyGraphsColors.

Usage

prettyGraphsColorSelection(n.colors = 1, offset = NULL, starting.color = 163)

Arguments

n.colors

number of colors needed

offset

numeric. Should be a prime number, if it is not, the closest prime is selected. This number decides the distance between indices for color selection.

starting.color

numeric. This is the starting location (e.g., color) in a matrix of prettyGraphsColors.

Value

a matrix

a matrix of colors are returned.

Author(s)

Derek Beaton

prime number selection from here:
http://stackoverflow.com/questions/3789968/generate-a-list-of-primes-in-r-up-to-a-certain-number

See Also


prettyGraphs

Publication-Quality Graphics

v2.1.6
GPL-2
Authors
Derek Beaton
Initial release
2018-12-17

We don't support your browser anymore

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