rev.colourmap {spatstat.geom}R 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)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

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)

[Package spatstat.geom version 3.4-1 Index]