Description Usage Arguments Value Examples
Ad-hoc function to plot growth curves contained in piled_curves objects.
In the option 'method = "input"'
only lines will be drawn, while in the
other cases both, lines and polygons are displayed. The curves are drawn in
the top-down direction. Most of the graphic parameters will be recycled.
For polygons, if not provided, the argument 'bottom'
will be
calculated as minimum value in growth curves.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
Character value indicating the time variable to be used as x-axis in the plot. |
y |
Object of class |
bottom |
Custom bottom used for polygons (optional). |
method |
Character value indicating slot of |
col, fill |
Colors used for |
lty, lwd |
Arguments passed to |
... |
Further arguments passed to |
A plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Subset to treatment T3
maize_model <- subset(maize_model, treatment == "T3")
## Create a piled_curves object
maize_growth <- pile(x=maize_model, time=c("current_date","development_stage","tsum"),
biomass=c("wst","wglv","wgld","yield"))
## Plot all single curves
par(mar=c(4,5,1,1))
plot("current_date", maize_growth, method="input", col=c("brown","darkgreen","darkgrey",
"red"), lwd=3, xlab="Time", ylab=expression("Biomass in g m"^-2))
## Plot piled curves (top is total aerial biomass)
plot("current_date", maize_growth, method="piled", col=c("brown","darkgreen","darkgrey",
"red"), fill=c("yellow","lightgreen","lightgrey","orange"),
lwd=3, xlab="Time", ylab=expression("Biomass in g m"^-2))
## Plot partition curves (top is total aerial biomass as unit)
plot("current_date", maize_growth, method="relative", col=c("brown","darkgreen",
"darkgrey", NA), fill=c("yellow","lightgreen","lightgrey","orange"),
lwd=3, xlab="Time", ylab="Biomass proportion")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.