-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_simulation.tex
89 lines (64 loc) · 2.25 KB
/
plot_simulation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
\documentclass[border=5pt]{standalone}
\newcommand{\case}{_1000_2_100_10_15}
\newcommand{\path}{cpp/outputs/}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
\pgfplotstableread{\path fwe_no_measures.out}{\plotdataEF}
\pgfplotstableread{\path bwe_quarantine.out}{\plotdataEB}
\pgfplotstableread{\path heun_lockdown.out}{\plotdataH}
\begin{tikzpicture}[scale=1]
\begin{axis}[
minor tick num=1,
max space between ticks=20pt,
grid=major,
xlabel={Time (days)},
ylabel=Cases,
title=Euler forward no measures,
legend pos=outer north east
]
\addplot [black,very thick] table [x index=0, y index=1] {\plotdataEF};
\addplot [orange,very thick] table [x index=0, y index=2] {\plotdataEF};
\addplot [blue,very thick] table [x index=0, y index=3] {\plotdataEF};
\addplot [green,very thick] table [x index=0, y index=4] {\plotdataEF};
\addplot [red,very thick] table [x index=0, y index=5] {\plotdataEF};
\legend{S, I, Q, R, D}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}[scale=1]
\begin{axis}[
minor tick num=1,
max space between ticks=20pt,
grid=major,
xlabel={Time (days)},
ylabel=Cases,
title=Euler backward quarantine,
legend pos=outer north east
]
\addplot [black,very thick] table [x index=0, y index=1] {\plotdataEB};
\addplot [orange,very thick] table [x index=0, y index=2] {\plotdataEB};
\addplot [blue,very thick] table [x index=0, y index=3] {\plotdataEB};
\addplot [green,very thick] table [x index=0, y index=4] {\plotdataEB};
\addplot [red,very thick] table [x index=0, y index=5] {\plotdataEB};
\legend{S, I, Q, R, D}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}[scale=1]
\begin{axis}[
minor tick num=1,
max space between ticks=20pt,
grid=major,
xlabel={Time (days)},
ylabel=Cases,
title=Heun lockdown,
legend pos=outer north east
]
\addplot [black,very thick] table [x index=0, y index=1] {\plotdataH};
\addplot [orange,very thick] table [x index=0, y index=2] {\plotdataH};
\addplot [blue,very thick] table [x index=0, y index=3] {\plotdataH};
\addplot [green,very thick] table [x index=0, y index=4] {\plotdataH};
\addplot [red,very thick] table [x index=0, y index=5] {\plotdataH};
\legend{S, I, Q, R, D}
\end{axis}
\end{tikzpicture}
\end{document}