I want to generate hidden markov models using tikz. I have successfully generated nodes and connected them. But i want to generate dashed lines generating below the node to an empty space like this . I tried to make it work using this code:
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,
semithick,scale=1.5,transform shape]
\tikzstyle{every state}=[fill=red,draw=none,text=white]
\node[state] (A) {$S_1$};
\node[state] (B) [right of=A] {$S_2$};
\path (A) edge [loop above] node {$a_{11}$} (A)
edge [bend left] node {$a_{12}$} (B)
(B) edge [loop above] node {$a_{22}$} (B)
edge [bend left] node {$a_{21}$} (A);
\draw [dashed] (A) edge [bend below] node {$b_{11}$};
\end{tikzpicture}
But this code doesn't work for me. It generates something like this
How do i draw dashed lines from the nodes exactly shown in the figure with nodes rainy and sunny?
Best Answer
Like this? The labels are not precise, you can change the labels to whatever you want.