colouroutputs

0th

Percentile

Extract or Assign Colour Values in a Colour Map

Extract the colour values in a colour map, or assign new colour values.

Keywords
color, spatial
Usage
colouroutputs(x)

colouroutputs(x) <- value

Arguments
x

A colour map (object of class "colourmap").

value

A vector of values that can be interpreted as colours.

Details

An object of class "colourmap" is effectively a function that maps its inputs (numbers or factor levels) to colour values.

The command colouroutputs(x) extracts the colour values in the colour map x.

The assignment colouroutputs(x) <- value replaces the colour values in the colour map x by the entries in value. The replacement vector value should have the same length as colouroutputs(x), and its entries should be interpretable as colours.

To change only some of the colour values in a colour map, it may be easier to use tweak.colourmap.

Value

The result of colouroutputs is a character vector of colour values. The result of the assignment colouroutputs(x) <- value is another colour map (object of class "colourmap").

See Also

colourmap, interp.colourmap, tweak.colourmap, colourtools.

Aliases
  • colouroutputs
  • colouroutputs<-
Examples
# NOT RUN {
  m <- colourmap(rainbow(5), range=c(0,1))
  m
  # reverse order of colours
  colouroutputs(m) <- rev(colouroutputs(m))
  m
# }
Documentation reproduced from package spatstat, version 1.59-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.