Learn R Programming

spectrolab (version 0.0.18)

plot.spectra: Plot spectra

Description

plot plots spectra.

Usage

# S3 method for spectra
plot(x, ylab = "value", xlab = "band", col = "black", lty = 1, type = "l", ...)

Value

nothing. Called for side effect.

Arguments

x

spectra object

ylab

label for y axis. Defaults to "value".

xlab

label for x axis. Defaults to "band".

col

line color. Defaults to "black".

lty

line type. Defaults to 1.

type

type of plot. Meant to take either line "l" or no plotting "n".

...

other arguments passed to matplot.

Author

Jose Eduardo Meireles

Examples

Run this code
library(spectrolab)
spec  = as_spectra(spec_matrix_example, name_idx = 1)
plot(spec, lwd = 1.2)

Run the code above in your browser using DataLab