Description Usage Arguments Details Author(s) Examples
Calculating and plotting the daily pattern of any variable with the option to use mean or both mean and median. There is also an option to plot quantiles.
1 2 3 4 5 |
x |
The variable to plot |
day.x |
The day variable associated with the X variable |
y |
A second optional variable to plot. |
day.y |
The day variable associated with the Y variable, also optional. |
median |
Logical. If TRUE the median is also plotted with the mean. |
quantiles |
Logical. If TRUE the quantiles will be plotted as a colour band |
probs |
An array of the quantiles to use. The default is 0.05 and 0.95 (5th and 95th). |
legend |
Logical. If TRUE a legend will be plotted. |
legendSide |
The side of the plot to place the legend. |
legendText |
The text to use for legend. |
type |
The type of plot. The default is a line plot. |
lty |
The type of line when a line plot is used. |
col |
The colour to use for the lines or points. It can be a single values or an array. |
cex.legend |
The size of the legend labels. |
horiz.legend |
A logical parameter. If TRUE the legend is will be placed horizontally. |
ylab |
The y-axis label. |
xlab |
The x-axis label. |
... |
Further graphical options. |
The function first aggregates the given variable daily and plots by default the mean. The median can also be plotted with the mean. There is an optional graphical output for quantiles. By default is the 5th and 95th but other quantiles can be used. There are two separate daily inputs to the functions to allow plotting variables from different data frames.
Georgios Xenakis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Load the data
data(fluxes)
## Clean and despike the fluxes
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,distCor=TRUE,timesList=3,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))
## Plot the daily patterns
plotDaily(x=fluxes$co2_flux,day.x=fluxes$yday,type='o',
median=TRUE,ylim=c(-30,20),lty=c(1,2),col=c(1,2),quantiles=TRUE,
legend=TRUE,legendSide='topleft',
lwd=2,ylab="Fc (umol m"^2~" s"^-1~")",main="Harwood forest",cex.legend=0.9,
horiz.legend=FALSE)
abline(h=0,lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.