2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00
LaTeX-examples/tikz/hidden-markov-model-abc-2/hidden-markov-model-abc-2.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

21 lines
1.3 KiB
TeX

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{units}
\usepackage{ifthen}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzstyle{vertex}=[draw,black,fill=blue,circle,minimum size=10pt,inner sep=0pt]
\tikzstyle{edge}=[very thick]
\begin{tikzpicture}[scale=2.5]
\node (x)[vertex,fill=gray!10,align=left,label=below:$x$] at (0,0) {$A~\nicefrac{6}{10}$\\$B~\nicefrac{2}{10}$\\$C~\nicefrac{2}{10}$};
\node (y)[vertex,fill=gray!10,align=left,label=below:$y$] at (1,0) {$A~\nicefrac{1}{10}$\\$B~\nicefrac{1}{10}$\\$C~\nicefrac{8}{10}$};
\node (z)[vertex,fill=gray!10,align=left,label=below:$z$] at (2,0) {$A~\nicefrac{5}{10}$\\$B~\nicefrac{2}{10}$\\$C~\nicefrac{3}{10}$};
\path[thick,->] (x) edge node [anchor=center,above,sloped] {$\nicefrac{2}{10}$} (y);
\path[thick,->] (y) edge node [anchor=center,above,sloped] {$\nicefrac{8}{10}$} (z);
\path[thick,->] (x) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$\nicefrac{8}{10}$} (x);
\path[thick,->] (y) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$\nicefrac{2}{10}$} (y);
\path[thick,->] (z) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$1$} (z);
\end{tikzpicture}
\end{document}