figSIRModel1.tex 629 Bytes
Newer Older
Chris Jewell's avatar
Chris Jewell committed
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
% TikZ SIR model picture
%
% Requries postitioning,arrows,fit,calc,backgrounds TikZ libraries

\begin{hyphenrules}{nohyphenation}

\begin{tikzpicture}[
auto,
node distance=48pt,
box/.style={
draw=black,
anchor=center,
align=center,
minimum height=36pt,
minimum width=36pt}]
\node[box, fill=ForestGreen] (S) {$S(t)$};
\node[box, fill=Red, right=of S] (I) {$I(t)$};
\node[box, fill=Gray, right=of I] (R) {$R(t)$};

\draw[->,very thick] (S) to node (SI) {$\beta I(t)S(t)$} (I);
\draw[->,very thick] (I) to node (IR) {$\gamma I(t)$} (R);
\draw[-*,dashed] (I) to [out=240,in=270,looseness=2] (SI);

\end{tikzpicture}
\end{hyphenrules}