\tikzstyle{block} = [draw, fill=white, rectangle, 
    minimum height=3em, minimum width=6em]
\tikzstyle{sum} = [draw, fill=white, rectangle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]

\begin{tikzpicture}[auto, node distance=2cm,>=latex']
\node [input, name=input] {};
\node [sum, right of=input] (sum) {S};
\node [block, right of=S] (E) {E};
\node [block, right of=E] (I) {I};
\node [block, above of=I] (J) {J};
\node [block, below of=J] (T) {T};

\node [output, below of=S] (output) {};
\node [output, below of=E] (output) {};
\node [output, below of=I] (output) {};
\node [output, right of=J] (output) {};
\node [output, right of=T] (output) {};

\draw [draw,->] (input) -- node {$A$} (S);
\draw [draw,->] (input) -- node {$\Lambda$} (S);
\draw [->] (S) -- node[name=$m \beta \left( \frac{I+l J}{N}  \right)$] {$m \beta \left( \frac{I+l J}{N}  \right)$} (E);
\draw [->] (S) -- node[name=$(1-m) \beta \left( \frac{I+l J}{N}  \right)$] {$m \beta \left( \frac{I+l J}{N}  \right)$} (I);
\draw [->] (E) -- node[name=k] {$k$} (I);
\draw [->] (I) -- node[name=n] {$k$} (J);
\draw [->] (I) -- node[name=$r_1$] {$r_1$} (T);
\draw [->] (J) -- node[name=$r_2$] {$r_2$} (T);
\draw [->] (T) -- node[name=$q\delta$] {$q\delta$} (E);
\draw [->] (T) -- node[name=$(1-q)\delta$] {$q\delta$} (S);

\draw [->] (s) -- node [name=$\mu$] {$\mu$}(output);
\draw [->] (E) -- node [name=$\mu$] {$\mu$}(output);
\draw [->] (I) -- node [name=$\mu+d_1$] {$\mu$}(output);
\draw [->] (J) -- node [name=$\mu+d_2$] {$\mu$}(output);
\draw [->] (T) -- node [name=$\mu$] {$\mu$}(output);


enter image description here

  • 1
    You are not really asking any questions. -all you do is ask for someone to do your work. Is your code not working? How does it fail? What problem do you have? Mar 19, 2019 at 22:06
  • it is not working Mar 19, 2019 at 22:07
  • Ok. How is it not working? What is causing you problems? Is there an error message, or an unexpected result? You need to edit your question to contain an explanation and an actually question. Mar 19, 2019 at 22:11
  • there is the error message not display any diagram Mar 19, 2019 at 22:20
  • Read the error message. If you do not understand it, then copy it into your question, and ask about it. In line 13 you call your node sum, but refer to it in line 14 as S. Mar 19, 2019 at 22:34

1 Answer 1


After some weeding I arrive at


\begin{tikzpicture}[auto, node distance=2cm,>=latex,block/.style={draw, fill=white, rectangle, 
    minimum height=3em, minimum width=6em}]
 \node[block] (S) {S};
 \node[block, right=of S] (E) {E};
 \node[block, right=of E] (I) {I};
 \node[block, above right=of I] (J) {J};
 \node[block, below right=of I] (T) {T};
 \draw[->] (S) -- ++ (0,2) -| node[pos=0.25,above]{$(1-m) \beta \left( \frac{I+l J}{N}  \right)$} (I); 
 \draw[->] (S) -- node[pos=0.5,below]{$m \beta \left( \frac{I+l J}{N}\right)$}(E);
 \draw[->] (E) -- node[pos=0.5,above]{$k$} (I);
 \draw[->] (E.90) -- ++ (0,0.5) node[right] {$\mu$};
 \draw[->] (I.20) -- node[pos=0.5,above,sloped] {$n$} (J.180);
 \draw[->] (I.-20) -- node[pos=0.5,below,sloped] {$r_1$} (T.180);
 \draw[->] (J) -- node[pos=0.5,right] {$r_2$} (T);
 \draw[->] (T.-135) -- ++ (0,-1) -| node[pos=0.25] {$q\delta$} (E);
 \draw[->] (T.-45) -- ++ (0,-2) -| node[pos=0.25] {$(1-q)\delta$} (S.-45);
 \draw[->] (S.-135) -- ++ (0,-1) node[below]{$\mu$};
 \draw[<-] (S.160) -- ++ (-1,0) node[left] {$\Lambda$};
 \draw[<-] (S.200) -- ++ (-1,0) node[left] {$A$};
 \draw[->] (T.0) -- ++ (1,0) node[right]{$\mu$};
 \draw[->] (J.0) -- ++ (1,0) node[right]{$\mu+d_2$};

enter image description here


  1. \tikzstyle is deprecated.
  2. So is the arrows library.
  3. And the positioning syntax you were using.
  4. You cannot give nodes a name that is a formula.
  5. It is not particularly useful to give different nodes the same names.
  6. This code can be optimized further. It is an attempted compromise between elegance and being very explicit and thus more understandable.
  • Darn you :-) I should have known you were awake, I got only one percent of it untangled in the last 30 mins, but am learning some TikZ at last :-) I see you 3.14 and raise you tau scientificamerican.com/article/…
    – user170109
    Mar 20, 2019 at 1:55
  • @KJO Sorry, I didn't know you were looking at it. (After looking at it I figured that the quickest way is to copy the formulae, delete the rest and draw it more or less from scratch.)
    – user121799
    Mar 20, 2019 at 1:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .