Learn R Programming

spatstat.geom (version 3.3-5)

rev.colourmap: Reverse the Colours in a Colour Map

Description

Reverse the sequence of colour values in a colour map.

Usage

# S3 method for colourmap
rev(x)

Value

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

Arguments

x

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

Author

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

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.

See Also

colourmap, colouroutputs

Examples

Run this code
  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)

Run the code above in your browser using DataLab