50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

ggspectra (version 0.3.6)

plot.generic_spct: Create a complete ggplot for a spectrum.

Description

This method returns a ggplot object with an annotated plot of an object of a class derived from generic_spct or of a class derived from generic_mspct for which a plot() method exists. It is implemented as a wrapper of autoplot(). This function is available for backwards compatibility, but new code should call this same function using method autoplot() instead.

Usage

# S3 method for generic_spct
plot(x, ...)

# S3 method for generic_mspct plot(x, ...)

# S3 method for waveband plot(x, ...)

Arguments

x

An R object derived from class generic_spct or derived from class generic_mspct.

...

Named arguments passed to plot() methods.

Value

a ggplot object.

Details

Support for autoplot() method for consistency with package 'ggplot2'. Please consult the documentation of the plot() methods for details about use of these autoplot methods. They are implemented as simple wrappers that forward the call to plot().

See Also

autoplot.calibration_spct, autoplot.cps_spct, autoplot.filter_spct, autoplot.raw_spct, autoplot.response_spct, autoplot.source_spct and autoplot.waveband.

Examples

Run this code
# NOT RUN {
plot(sun.spct, annotations = "") # deprecated syntax
autoplot(sun.spct, annotations = "") # preferred syntax

# }

Run the code above in your browser using DataLab