oce (version 1.2-0)

oceColorsViridis: Create colors similar to the matlab Viridis scheme

Description

This is patterned on a matlab/python scheme (reference 1) that blends from yellow to blue in a way that is designed to reproduce well in black-and-white, and to be interpretable by those with certain forms of color blindness (references 3-4).

Usage

oceColorsViridis(n)

Arguments

n

number of colors to create.

References

  1. A blog item on the Viridis (and related) matplotlib color scales is at http://bids.github.io/colormap/.

  2. Light, A., and P. J. Bartlein, 2004. The End of the Rainbow? Color Schemes for Improved Data Graphics. Eos Trans. AGU, 85(40), doi:10.1029/2004EO400002.

  3. Martin Jakobsson, Ron Macnab, and Members of the Editorial Board, IBCAO. Selective comparisons of GEBCO (1979) and IBCAO (2000) maps. https://www.ngdc.noaa.gov/mgg/bathymetry/arctic/ibcao_gebco_comp.html.

  4. Stephenson, David B., 2005. Comment on ``Color schemes for improved data graphics,'' by A. Light and P. J. Bartlein. Eos Trans. AGU, 86(20).

See Also

Other things related to colors: colormap(), oceColors9B(), oceColorsCDOM(), oceColorsChlorophyll(), oceColorsClosure(), oceColorsDensity(), oceColorsFreesurface(), oceColorsGebco(), oceColorsJet(), oceColorsOxygen(), oceColorsPAR(), oceColorsPalette(), oceColorsPhase(), oceColorsSalinity(), oceColorsTemperature(), oceColorsTurbidity(), oceColorsTwo(), oceColorsVelocity(), oceColorsVorticity(), ocecolors

Examples

Run this code
# NOT RUN {
library(oce)
imagep(volcano, col=oceColorsViridis(128),
       zlab="oceColorsViridis")
# }

Run the code above in your browser using DataCamp Workspace