-
Notifications
You must be signed in to change notification settings - Fork 0
/
prediction.tex
72 lines (67 loc) · 1.55 KB
/
prediction.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
% For DOI: 10.6084/m9.figshare.21981578
\documentclass[border = 3mm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots} % For plotting curves
\begin{document}
\begin{tikzpicture}[font = \sffamily] % Sans serif
\begin{axis}[
ticks = none,
xtick distance = 1,
ytick distance = 1,
axis equal image = true,
grid = none,
xlabel = {Time},
ylabel = {Cases},
axis lines = middle,
xmin = 0, xmax = 8, ymin = 0, ymax = 4,
axis x line = center,
axis y line = left,
legend style = {draw = none, % No border
nodes = {scale = 0.7, transform shape}}, % Re-scale to be smaller
clip = false % Allow text outside of plot for annotations below time axis
]
\addplot[thick, smooth, color = blue, forget plot] plot coordinates
{
(0, 1)
(0.5, 3)
(4, 1.9)
};
\addplot[thick, smooth, color = blue, forget plot] plot coordinates
{
(0, 1)
(1.2, 0.6)
(2.7, 1.2)
(4, 0.3)
};
\addplot[thick, smooth, color = black] plot coordinates
{
(0, 1)
(2.5, 2)
(4, 0.7)
};
\addlegendentry{Truth}
\addplot[thick, smooth, color = blue] plot coordinates
{
(4, 0.7)
(5, 1)
(5.5, 2.8)
(6.5, 2)
(7.5, 3)
};
\addlegendentry{Prediction}
\addplot[thick, smooth, color = blue, forget plot] plot coordinates
{
(4, 0.7)
(4.5, 0.3)
(5.3, 0.6)
(6, 0.8)
(7, 1)
(7.5, 1.7)
};
\addplot[mark=none, dashed, forget plot] coordinates {(4,0) (4,4)};
\node at (axis cs:4.6, 3.7) {Now};
\node at (axis cs:2, -0.5) {Projection};
\node at (axis cs:6, -0.5) {Forecast};
\end{axis}
\end{tikzpicture}
\end{document}