contrasting.rainbow: Rainbow of colours permuted to maximise contrast.

Description Usage Arguments Details Value Author(s) Examples

Description

Returns a rainbow of colours, permuted so that adjacent elements constrast each other as much as possible.

Usage

1

Arguments

x

number of colours in the rainbow.

...

other arguments to be passed to rainbow.

Details

The permutation is chosen by finding the largest coprime of x that is not greater than x/2, and using that coprime as an increment size to cycle through the normal rainbow.

Value

A vector of colours of length x.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
## contrasting colours suitable for Manhattan plot for 22 autosomes
plot(1:22, rep(1, 22), pch = 22, cex = 2, ann = FALSE, 
     yaxt = "n", bg = contrasting.rainbow(22))

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.