-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathoceColorsVorticity.Rd
111 lines (104 loc) · 3.71 KB
/
oceColorsVorticity.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oce.R
\name{oceColorsVorticity}
\alias{oceColorsVorticity}
\alias{oce.colorsVorticity}
\title{Create Colors Suitable for vorticity Fields}
\usage{
oceColorsVorticity(n)
}
\arguments{
\item{n}{number of colors to create.}
}
\value{
A vector of color specifications.
}
\description{
Create a set of colors for displaying vorticity 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 \code{oce} code. To get the
latest versions of these colours or other colours,
use the \CRANpkg{cmocean} R package
(Thyng, Richards, and Krylov, 2019) directly, as is
illustrated (with the "matter" scheme) in Example 2.
Note that the \CRANpkg{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
\CRANpkg{viridis} package, as illustrated (with the
"inferno" scheme) in Example 3.
}
\examples{
library(oce)
# Example 1
imagep(volcano, col=oceColorsVorticity(128),
zlab="oceColorsVorticity")
\dontrun{
# Example 2 (requires the cmocean package)
imagep(volcano, col=cmocean::cmocean("matter"),
zlab="cmocean::cmocean(\"matter\")")}
\dontrun{
# Example 3 (requires the viridis package)
imagep(volcano, col=viridis::inferno,
zlab="viridis::inferno")}
}
\references{
\itemize{
\item Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, and Steven DiMarco.
\dQuote{True Colors of Oceanography: Guidelines for Effective and Accurate Colormap Selection.}
Oceanography 29, no. 3 (September 1, 2016): 9–13.
\doi{10.5670/oceanog.2016.66}
\item Thyng, Kristen. Kthyng/Cmocean. Python, 2019.
\verb{https://github.com/kthyng/cmocean}.
\item Thyng, Kristen, Clark Richards, and Ivan Krylov.
Cmocean: Beautiful Colour Maps for Oceanography (version 0.2), 2019.
\verb{https://CRAN.R-project.org/package=cmocean}.
}
The following references provide information on choosing
colour schemes, that are suitable for viewers who have
colour deficiencies.
Light, Adam, and Patrick J. Bartlein. "The End of the Rainbow? Color
Schemes for Improved Data Graphics." \emph{Eos, Transactions American Geophysical
Union} 85, no. 40 (2004): 385.
DOI: 10.1029/2004EO400002
Stephenson, David B. "Comment on 'Color Schemes for Improved Data
Graphics', by A Light and P.J. Bartlein." \emph{Eos, Transactions American
Geophysical Union} 86, no. 20 (2005): 196.
DOI: 10.1029/2005EO200005
Light, Adam, and Patrick J. Bartlein. "Reply to 'Comment on Color
Schemes for Improved Data Graphics,' by A. Light and P.J. Bartlein'."
\emph{Eos, Transactions American Geophysical Union} 86, no. 20 (2005): 196–196.
DOI: 10.1029/2005EO200006
}
\seealso{
Other things related to colors:
\code{\link{colormap}()},
\code{\link{colormapGMT}()},
\code{\link{oceColors9B}()},
\code{\link{oceColorsCDOM}()},
\code{\link{oceColorsChlorophyll}()},
\code{\link{oceColorsClosure}()},
\code{\link{oceColorsDensity}()},
\code{\link{oceColorsFreesurface}()},
\code{\link{oceColorsGebco}()},
\code{\link{oceColorsJet}()},
\code{\link{oceColorsOxygen}()},
\code{\link{oceColorsPAR}()},
\code{\link{oceColorsPalette}()},
\code{\link{oceColorsPhase}()},
\code{\link{oceColorsSalinity}()},
\code{\link{oceColorsTemperature}()},
\code{\link{oceColorsTurbidity}()},
\code{\link{oceColorsTurbo}()},
\code{\link{oceColorsTwo}()},
\code{\link{oceColorsVelocity}()},
\code{\link{oceColorsViridis}()},
\code{\link{ocecolors}}
}
\author{
Krysten M. Thyng (Python version), Dan Kelley (R transliteration)
}
\concept{things related to colors}