oceColorsOxygen: Create colors suitable for oxygen fields

Description Usage Arguments Value Author(s) References See Also Examples

Description

Create a set of colors for displaying oxygen values, based on the scheme devised by Thyng et al. (2016) and presented in a python package by Thyng (2019). The color specifications were transliterated from python to R on 2015-09-29, but have not been adjusted since, even though the python source has changed. This is to prevent breaking old oce code. To get the latest versions of these colours or other colours, use the cmocean R package (Thyng, Richards, and Krylov, 2019) directly, as is illustrated (with the "matter" scheme) in Example 2. Note that the cmocean core functions provide a way to select between various versions of the colour schemes. It is also worth considering the palettes provided by the viridis package, as illustrated (with the "inferno" scheme) in Example 3.

Usage

1

Arguments

n

number of colors to create.

Value

A vector of color specifications.

Author(s)

Krysten M. Thyng (Python version), Dan Kelley (R transliteration)

References

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(oce)

# Example 1
imagep(volcano, col=oceColorsOxygen(128),
       zlab="oceColorsOxygen")
## Not run: 
# Example 2 (requires the cmocean package)
imagep(volcano, col=cmocean::cmocean("matter"),
       zlab='cmocean::cmocean("matter")')
## End(Not run)

## Not run: 
# Example 3 (requires the viridis package)
imagep(volcano, col=viridis::inferno,
       zlab='viridis::inferno')
## End(Not run)

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