oceColorsViridis: Create colors similar to the matlab Viridis scheme

Description Usage Arguments Author(s) References See Also Examples

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). An alternative to this is provide in the viridis package, as illustrated in Example 2.

Usage

1

Arguments

n

number of colors to create.

Author(s)

Dan Kelley

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(), oceColorsTurbo(), oceColorsTwo(), oceColorsVelocity(), oceColorsVorticity(), ocecolors

Examples

1
2
3
4
5
6
7
8
9
library(oce)
# Example 1: oceColorsViridis
imagep(volcano, col=oceColorsViridis(128),
       zlab="oceColorsViridis")
# Example 2: viridis::viridis
## Not run: 
imagep(volcano, col=viridis::viridis,
       zlab="viridis::viridis")
## End(Not run)

oce documentation built on March 28, 2021, 9:09 a.m.