Learn R Programming

spectrolab (version 0.0.12)

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", ...)

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.

Value

nothing. Called for side effect.

Examples

Run this code
# NOT RUN {
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