Learn R Programming

FREddyPro (version 1.0)

plotTimeseries: Plot a time series plot

Description

A function to plot some of the most commonly and important variables given in a standard EddyPro output file as a time series plot. The variables which will be plotted include 1) CO2 flux, sensible heat, latent heat, air temperature, vapour pressure deficit, and wind speed. Net radiation is optional.

Usage

plotTimeseries(data1, limList = NULL, data2 = NULL, step = 1, legendText = NULL, ...)

Arguments

data1
The data frame to use for plotting.
limList
A list giving the ylim for the plotted variables. If a variable is missing from the list, ylim is derived from the range of the data. Not all variables are necessary to appear in the list.
data2
A second data frame to use for plotting and compare with the first. This is optional.
step
The length between tics in the x-axis. Default is 1 day
legendText
The legend to appear in each subplot. This is usually necessary when two data frames are used which might be from different sites or treatments.
...
Further graphical paramters.

Examples

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

## Load the data
data(fluxes)

## Clean the fluxes
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,distCor=TRUE,timesList=3,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))	

## Plot all major data in as a timeseries.
plotTimeseries(fluxes,limList=list(DOY=c(146,183)),step=2,type='o',
cex=0.6,pch=1,lwd=0.5,lty=2)

Run the code above in your browser using DataLab