swatch | R Documentation |
This function provides a simple visualisation of a colour series as a series of boxes against the specified background colour. If the input has more than one dimension then the boxes will be arranged in a grid (flattening further dimensions after the second).
swatch(x, bg = "white", ...)
x |
One or more colours, in any suitable form (see
|
bg |
A background colour. |
... |
Additional arguments (currently unused). |
Jon Clayden code@clayden.org
swatch(c("red", "green", "blue"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.