ggspectra (version 0.3.1)

plot.waveband: Plot method for waveband objects.

Description

This function returns a ggplot object with an annotated plot of a waveband object.

Usage

# S3 method for waveband
plot(x, ..., w.length = NULL, range = c(280, 800),
  fill = 0, span = NULL,
  unit.in = getOption("photobiology.radiation.unit", default = "energy"),
  annotations = NULL, wb.trim = TRUE, norm = NULL, text.size = 2.5,
  ylim = c(NA, NA), na.rm = TRUE)

Arguments

x

a waveband object.

...

currently ignored.

w.length

numeric vector of wavelengths (nm)

range

an R object on which range() returns a vector of length 2, with min annd max wavelengths (nm).

fill

value to use as response for wavelngths outside the waveband range.

span

a peak is defined as an element in a sequence which is greater than all other elements within a window of width span centered at that element.

unit.in

the type of unit we assume as reference "energy" or "photon" based.

annotations

a character vector.

wb.trim

logical.

norm

numeric normalization wavelength (nm) or character string "max" for normalization at the wavelength of highest peak.

text.size

numeric size of text in the plot decorations.

ylim

numeric y axis limits,

na.rm

logical.

Value

a ggplot object.

See Also

Other plot functions: autoplot.generic_spct, plot.calibration_spct, plot.cps_spct, plot.filter_spct, plot.object_spct, plot.raw_spct, plot.reflector_spct, plot.response_spct, plot.source_spct

Examples

Run this code
# NOT RUN {
library(photobiology)
plot(waveband(c(400, 500)))

# }

Run the code above in your browser using DataCamp Workspace