conColScheme | R Documentation |
This function permits you to change the color scheme of an existing
Spectra
or Spectra2D
object.
conColScheme(spectra, new.cols = NULL, silent = FALSE)
spectra |
An object of S3 class |
new.cols |
A character vector giving the new color values, of
|
silent |
Logical. If |
spectra An object of S3 class ChemoSpec::Spectra()
or ChemoSpec2D::Spectra2D()
.
Bryan A. Hanson (DePauw University).
For a discussion of general issues of color, see
colorSymbol
.
if (checkForPackageWithVersion("ChemoSpec", 6.0)) {
library("ChemoSpec")
data(metMUD1)
sumSpectra(metMUD1)
newSpec <- conColScheme(metMUD1) # reports old colors
newSpec <- conColScheme(metMUD1, new = c("pink", "violet"))
}
if (checkForPackageWithVersion("ChemoSpec2D", 0.5)) {
library("ChemoSpec2D")
data(MUD1)
sumSpectra(MUD1)
newSpec <- conColScheme(MUD1) # reports old colors
newSpec <- conColScheme(MUD1, new = c("pink", "violet"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.