Skip to content

Commit 8361672

Browse files
authored
Merge pull request ReScience#16 from BIO6032/code_Fig3
Fig. 3a) and 3b)
2 parents 56ad02c + 213149d commit 8361672

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

code/figure1.jl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
using NamedTuples
2+
using Plots
23

34
include("functions.jl")
45

5-
# ...
6+
# Simulation with specialist natural enemies with m=0.2
7+
simulation1 = simulation(50.0, 25.0, m=0.2, F=4.0, D=0.5, c=1.0, a=0.5, th = 0.0)
8+
# Fig 3a)
9+
plot(simulation1[:,2:3], xlabel = "Generations",
10+
labels = ["N", "P"],
11+
ylims = (0, 50),
12+
ylabel = "Populations")
13+
14+
# Simulation with specialist natural enemies with m=0.8
15+
simulation2 = simulation(50.0, 25.0, m=0.8, F=4.0, D=0.5, c=1.0, a=0.5, th = 0.0)
16+
# Fig 3b)
17+
plot(simulation2[:,2:3], xlabel = "Generations",
18+
labels = ["N", "P"],
19+
ylims = (0, 50),
20+
ylabel = "Populations")
21+

0 commit comments

Comments
 (0)