drGeorgeXenakis / FREddyPro

Post-Processing GHG fluxes after calculations using EddyPro from the Full Output File
GNU General Public License v3.0
2 stars 1 forks source link

Use ggplot2 in `plotMonthly` #12

Open ronnyhdez opened 2 years ago

ronnyhdez commented 2 years ago

Within the FREddyPro project we can run this to check the example plot:

## 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 monthly
plotMonthly(fluxes,"co2_flux",legend=TRUE,legendSide='bottomleft',type='o',
lty=2,ylim=c(-50,20),col=1,yaxt.in='n',yaxt.out='n',xaxt.in='n',xaxt.out='n',
at2.out=seq(-50,10,10),axis2.out=TRUE,at1.out=seq(0,23,2),axis1.out=TRUE,
at1.in=seq(0,23,2),axis1.in=TRUE)

## Put some text as title and axis labels
mtext(side=3,"Harwood forest",outer=TRUE,line=2,cex=1.2)
mtext(side=2,"Fc (umol m"^-2~" s"^-1~")",outer=TRUE,line=2,cex=1.2)
mtext(side=1,"Hour",outer=TRUE,line=3,cex=1.2)