Learn R Programming

hues (version 0.2.0)

swatch: Plot colour swatches for a vector of colours

Description

Plot named colour swatches for a vector of colours.

Usage

swatch(x)

Arguments

x

a vector of colours, specified as: colour names (i.e. colour names returned by colors()); numeric indices into palette(), or hexadecimal strings in the form "#RRGGBB", where RR, GG, and BB are pairs of hexadecimal digits representing red, green, and blue components, in the range 00 to FF.

Value

NULL. The colour swatch is plotted to the active plotting device.

See Also

iwanthue

Examples

Run this code
# NOT RUN {
swatch(colours()[1:10])
swatch(1:4)
swatch(iwanthue(5))
# }

Run the code above in your browser using DataLab