powered by
Reverse the sequence of colour values in a colour map.
# S3 method for colourmap rev(x)
A colour map (object of class "colourmap").
"colourmap"
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
This is a method for the generic rev for the class of colour maps.
rev
The sequence of colour values in the colour map will be reversed, without changing any other details.
colourmap, colouroutputs
colourmap
colouroutputs
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