plot_mutualism_portrait | R Documentation |
Generate a phase portrait for the model of mutualism with saturating functional response.
plot_mutualism_portrait(sim_df, vec = TRUE, traj = TRUE, ...)
sim_df |
Data frame of mutualism model simulation returned by
|
vec |
Logical. If |
traj |
Logical. If |
... |
Arguments passed on to
|
A ggplot object with population sizes (N1
, N2
) plotted against one
another as a phase portrait. Zero net growth isoclines for each species are
also plotted. Optionally, a vector field and/or trajectories of population
sizes can also be plotted.
The plot generated with this function is constrained to display only the
first quadrant (i.e. values of 0 and above) of the phase plane defined by
N1
and N2
because negative values of N
do not make biological sense. As
a consequence, when sim_df
is generated using negative values for r1
and/or r2
, the corresponding zero net growth isoclines may not be visible
in the plot if they lie largely beyond the plot's limits.
run_mutualism()
, plot_mutualism_time()
# Plot phase portrait with vector field and population trajectories
sim <- run_mutualism()
plot_mutualism_portrait(sim)
# Plot phase portrait without vector field
sim <- run_mutualism()
plot_mutualism_portrait(sim, vec = FALSE)
# Plot phase portrait without population trajectories
sim <- run_mutualism()
plot_mutualism_portrait(sim, traj = FALSE)
# Customize vector field
sim <- run_mutualism()
plot_mutualism_portrait(sim, vec.density = 10, vec.scale = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.