如何在 LaTeX 上绘制这样的网络图

如何在 LaTeX 上绘制这样的网络图

我对乳胶还很陌生,我想知道如何从马尔可夫链中绘制以下网络图。谢谢。 在此处输入图片描述

答案1

仅作为起点。

\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning}
\begin{document}

\tikzset{ell/.style={ellipse,draw,minimum height=0.65cm,minimum width=1cm,inner sep=0.25cm}}

\begin{tikzpicture}[>=stealth]
\node[ell] (e1)at (0,0) {\color{blue}$SOC1$};
\node[ell] (e2)at (5,2) {\color{blue}$SOC2$};
\node[ell] (e4)at (5,5) {\color{blue}$SOC4$};
\node[ell] (e3)at (-5,3) {\color{blue}$SOC3$};
\node[ell] (e5)at (-1,7) {\color{blue}$SOC5$};
\draw [->] (e4) to [out=-20,in=20]node[right]{\color{red}$p^{\phi} (0)$} (e2);
\draw [->] (e2) to [out=-20,in=-40,looseness=5]node[right]{\color{red}$p^{\phi} (1)$} (e2);
\draw [->] (e2) to [out=-90,in=-30]node[right=2mm]{\color{red}$p^{\phi} (0)$} (e1);
\draw [->] (e1) to [out=0,in=240]node[right=2mm]{\color{red}$p^{\phi} (1)$} (e2);
\draw [->] (e2) to [out=190,in=-30]node[below]{\color{red}$p^{\phi} (2)$} (e3);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容