Learn R Programming

spatstat.geom (version 3.6-0)

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)

Arguments

Value

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.

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