plotColourKey: Plot a colour key

Description Usage Arguments Author(s) Examples

Description

Easy plotting of a colour key.

Usage

1
plotColourKey(breaks, col, add = FALSE, ...)

Arguments

breaks

A numeric vector of length n giving the breakpoints of the key.

col

A character vector of the colours used of length n - 1.

add

Should the key be added to the current plot device?

...

Arguments passed to rect.

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>

Examples

1
2
3
4
5
brks <- seq(0, 1, length.out = 8)
cls <- rainbow(7)
plotColourKey(brks, cls)
axis(1)
axis(2)

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.