plot: Plot Growth Curves

Description Usage Arguments Value Examples

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S4 method for signature 'character,piled_curves'
plot(
  x,
  y,
  bottom,
  method = c("input", "piled", "relative"),
  col = c("black", "grey"),
  fill = c("lightgreen", "darkgreen"),
  lty = 1,
  lwd = 1,
  ...
)

Arguments

x

Character value indicating the time variable to be used as x-axis in the plot.

y

Object of class piled_curves containing the values to be used in the plot.

bottom

Custom bottom used for polygons (optional).

method

Character value indicating slot of 'y' to be used for the plot.

col, fill

Colors used for lines or polygon, respectively.

lty, lwd

Arguments passed to lines.

...

Further arguments passed to plot.

Value

A plot.

Examples

 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")

kamapu/cropgrowth documentation built on Aug. 22, 2021, 8:55 a.m.