状态转换图

状态转换图

有人能给我提供一个绘制此类图表的起点吗?我在网上搜索过,但找不到合适的链接。问候 在此处输入图片描述

答案1

锻炼身体……

在此处输入图片描述

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta, chains, quotes}

\begin{document}
    \begin{tikzpicture}[
        > = Triangle,
node distance = 8mm and 24mm,
  start chain = going below,
     C/.style = {shape=circle, draw,
                 fill=blue!60!gray!30!white,
                 inner sep=0pt, outer sep=0pt, minimum size=6pt,
                 node contents={},
                 },
every edge quotes/.style = {inner sep=2pt, font=\footnotesize, sloped,anchor=south}
                            ]
\foreach \i in {1,...,4}
{
\ifnum\i=1
    \node (n1\i)    [C,on chain,label=left:$\mathrm{PM}(t)$];
    \node (n2\i)    [C,right=of n11,
                        label=right:{$\mathrm{PM}(t+1)
                                        =\max\bigl(\mathrm{BM}(t),
                                                   \mathrm{BM}(T)\bigr)$}];
\else
    \node (n1\i)    [C,on chain];
    \node (n2\i)    [C,right=of n1\i];
\fi
}
\draw   (n11) edge[->,"$\mathrm{BM}(t)$"]   (n21)
        (n13) edge[->,"$\mathrm{BM}(t)$"]   (n21);
    \end{tikzpicture}
\end{document}

答案2

道路pstricks

\documentclass{article}
\usepackage{pst-node}
\usepackage{auto-pst-pdf}

\begin{document}

\[ \everypsbox{\scriptstyle}%
\begin{psmatrix}[emnode=dot, rowsep=0.6cm, dotsize=5pt]
%%% Matrix nodes
 & & \\
 & & \\
 & & \\
 & &
%%% Arrows & labels
\psset{arrows=->, arrowinset=0.1, arrowsize=3pt, nodesep=0pt, shortput=nab, labelsep=1pt}
\ncline{1,1}{1,2}^{BM(t)}
\ncline{3,1}{1,2}^[nrot=:U]{BM(t)}
\psset{labelsep=1.25em}
\everypsbox{\textstyle}
\nput{180}{1,1}{PM(t)}
\nput{0}{1,2}{PM(t + 1)= \max\bigl(BM(t),BM(T)\bigr)}
\end{psmatrix}
\]%

\end{document} 

在此处输入图片描述

相关内容