Learn R Programming

FREddyPro (version 1.0)

plotSpectra: Plot spectra

Description

Function to plot the ensemble spectra output from EddyPro.

Usage

plotSpectra(data, gas, xlab = "Frequency [Hz]", ylab = "Spectrum", avgT = FALSE, predicted = FALSE, type = c("o", "o", "o"), col = c(1, 2, 4), pch=c(1,1,1), na.value = "NaN", ...)

Arguments

data
The data frame.
gas
A character giving the name of the gas which spectra will be plotted.
xlab
The label for the x axis.
ylab
The label for the y axis.
avgT
Logical. If TRUE the avgT will be plotted.
predicted
Logical. If TRUE the predicted spectra will be plotted.
type
The type of plot. Default is point-line. It can be a single value or an array.
col
The color of the points/lines. It can be a single value or an array.
pch
The type of points to use. It can be a single value or an array.
na.value
The number/string to use for identifying NA values.
...
Further graphical parameters.

Examples

Run this code
## Close any previously open graphic devices
graphics.off()

## Load the data
data(spectra)

## Plot the spectra
plotSpectra(spectra,"co2",predict=TRUE,avgT=TRUE,type=c('p','l','l'),pch=c(16,-1,-1))

Run the code above in your browser using DataLab