Uses ggplot2
to create a 2D line plot of u(l, t)
for snapshots at yearly
intervals, starting at year 1. The matrix returned by getDensity()
has rows
corresponding to time steps (starting at t = 0 in the first row) and columns
to size classes.
Arguments
- u
A numeric matrix as returned by
getDensity()
(rows = time, columns = size).- Delta_l
Size step size used to compute
u
.- Delta_t
Time step size used to compute
u
.- l_offset
Optional offset added to the size axis labels (default 0).
- years
Optional numeric vector of years to plot (integers). If not supplied, uses all integers from 1 up to the largest full year covered by the simulation time.
Examples
if (FALSE) { # \dontrun{
pars <- list(k = 0.5, L_inf = 100, d = 0.01, m = 0.01)
u <- getDensity(pars, l_max = 100, Delta_l = 1, t_max = 10, Delta_t = 0.1)
plotDensity2D(u, Delta_l = 1, Delta_t = 0.1)
} # }