rev.colourmap: Reverse the Colours in a Colour Map

View source: R/colourtables.R

rev.colourmapR Documentation

Reverse the Colours in a Colour Map

Description

Reverse the sequence of colour values in a colour map.

Usage

  ## S3 method for class 'colourmap'
rev(x)

Arguments

x

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

Details

This is a method for the generic rev for the class of colour maps.

The sequence of colour values in the colour map will be reversed, without changing any other details.

Value

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

Author(s)

\spatstatAuthors

.

See Also

colourmap, colouroutputs

Examples

  co <- colourmap(rainbow(100), range=c(-1,1))
  opa <- par(mfrow=c(1,2))
  plot(co, vertical=TRUE)
  plot(rev(co), vertical=TRUE)
  par(opa)

spatstat/spatstat.geom documentation built on Feb. 20, 2025, 7:24 p.m.