tweak.colourmap | R Documentation |
Assign new colour values to some of the entries in a colour map.
tweak.colourmap(m, col, ..., inputs=NULL, range=NULL)
m |
A colour map (object of class |
inputs |
Input values to the colour map, to be assigned new colours.
Incompatible with |
range |
Numeric vector of length 2 specifying a range of numerical values
which should be assigned a new colour.
Incompatible with |
col |
Replacement colours for the specified |
... |
Other arguments are ignored. |
This function changes the colour map m
by assigning new colours to each of the
input values specified by inputs
,
or by assigning a single new colour
to the range of input values specified by range
.
The modified colour map is returned.
Another colour map (object of class "colourmap"
).
.
colourmap
,
interp.colourmap
,
colouroutputs
,
colourtools
.
co <- colourmap(rainbow(32), range=c(0,1))
plot(tweak.colourmap(co, inputs=c(0.5, 0.6), "white"))
plot(tweak.colourmap(co, range=c(0.5,0.6), "white"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.