Skip to contents

Generate a phase portrait (N1 vs N2) plot for the Lotka-Volterra model

Usage

plot_lvcomp_portrait(sim_df, params, margin_text = FALSE)

Arguments

sim_df

data frame of lokta-volterra model simulation (created by run_lvcomp_model())

params

vector of model parameters Note that carrying capacity for both species can be defined in params either as K1 and K2, or in the inverse, as a11 and a22. If carrying capacities are defined as K1 and K2, interspecific competition should be defined as a and b; otherwise, a12 and a21.

margin_text

add text annotations to margins of isoclines?

See also

run_lvcomp_model() for simulating Lotka-Volterra competition dynamics between two species given a vector of parameters, and plot_lvcomp_time() for making a plot of population dynamics over time

Examples

params_vec = c(r1 = .5, r2 = .6, K1 = 1000, K2 = 1050, a = 0.5, b = 0.7)
sim_df <- run_lvcomp_model(time = 0:50, init = c(N1 = 1, N2 = 5), params =
params_vec)
plot_lvcomp_portrait(sim_df, params_vec)