-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathoceColorsClosure.Rd
62 lines (60 loc) · 1.99 KB
/
oceColorsClosure.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oce.R
\name{oceColorsClosure}
\alias{oceColorsClosure}
\title{Create Color Functions}
\usage{
oceColorsClosure(spec)
}
\arguments{
\item{spec}{Specification of the color scheme. This may be a
character string, in which case it must be the name of an item stored
in \code{data(ocecolors)}, or either a 3-column data frame or
matrix, in which case the columns specify red, green and blue values
(in range from 0 to 1).}
}
\description{
This function generates other functions that are used to specify colors.
It is used within oce to create \code{\link[=oceColorsTemperature]{oceColorsTemperature()}}
and its many cousins. Users may also find it helpful, for creating
custom color schemes (see \dQuote{Examples}).
}
\section{Sample of Usage}{
\preformatted{
# Update oxygen color scheme to latest matplotlib value.
library(oce)
oxy <- "https://raw.githubusercontent.com/matplotlib/cmocean/master/cmocean/rgb/oxy-rgb.txt"
oxyrgb <- read.table(oxy, header=FALSE)
oceColorsOxygenUpdated <- oceColorsClosure(oxyrgb)
par(mfrow=c(1, 2))
m <- matrix(1:256)
imagep(m, col=oceColorsOxygen, zlab="oxygen")
imagep(m, col=oceColorsOxygenUpdated, zlab="oxygenUpdated")
}
}
\seealso{
Other things related to colors:
\code{\link{colormap}()},
\code{\link{colormapGMT}()},
\code{\link{oceColors9B}()},
\code{\link{oceColorsCDOM}()},
\code{\link{oceColorsChlorophyll}()},
\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{oceColorsVorticity}()},
\code{\link{ocecolors}}
}
\concept{things related to colors}