## Close any previously open graphic devices
graphics.off()
## Load the data
data(fluxes)
## Clean fluxes
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,timesList=3,distCor=TRUE,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))
## Plot CO2 fluxes based on the QC flag
plotQC(fluxes,"co2_flux",legendSide='bottomleft',xlab="Day of year",
lines=TRUE,lty=2,ylab="F"[c]~" (umol/m"^2~"/s)",col=c(1,1,1),pch=c(1,2,8),
xlim=c(150,155),xaxt='n',main='QC flags')
## Draw a new X-axis
axis(1,at=seq(150,155,0.5),labels=TRUE)
## A horizontal line
abline(h=0,lty=2)
Run the code above in your browser using DataLab