Description Usage Arguments Value Author(s) See Also Examples
The continuous interval defined by range
is divided into bins of
equal size. Each bin is mapped to a colour in the palette defined by pal
.
The values in x
are then assigned to the bins and their corresponding
colours are returned. Values outside the interval are assigned to the border
bins.
1 | discrete.color(x, range = range(x), pal = "GnRd")
|
x |
Continuous numbers. |
range |
The interval in |
pal |
Palette. Can be the name of a predefined palette, as returned by
|
Colour indices from pal
corresponding to where in the range
the values in x
are.
Christofer Bäcklin
xterm.pal
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.