传输图

传输图

我需要为正在开发的模型创建传输图。但是,我刚开始使用 LaTeX 绘制图表。有人能建议如何在 LaTeX 上绘制下图吗?

答案1

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
    \begin{tikzpicture}[%
            node distance = 17mm,
            state/.style = {%
                rectangle,
                        draw = black,
                   inner sep = 0pt,
                minimum size = 7mm,
                thick,
            },
            beta/.style = {%
            node distance = 2mm,
                inner sep = 1pt,
            },
            auto,
        ]
        \node (a1) [state] {$A_1$};
        \node (a2) [right=of a1,state] {$A_2$};
        \node (a5) [right=of a2,state] {$A_5$};
        \node (a6) [right=of a5,state] {$A_6$};
        \node (a3) [above=of a2,state] {$A_3$};
        \node (a4) [below=of a2,state] {$A_4$};
        \node (a8) [above right=of a6,state] {$A_8$};
        \node (a7) [below right=of a6,state] {$A_7$};

        \draw [->] (a1) to node {$\alpha_2$} (a2);
        \draw [->] (a3) to node {$\alpha_1$} (a2);
        \draw [->] (a2) to node {$\alpha_2$} (a4);
        \draw [->] (a2) to node {$\alpha_3$} (a5);
        \draw [->,swap] (a4) to node {$\alpha_4$} (a5);
        \draw [->] (a5) to node {$\alpha_5$} (a6);
        \draw [->] (a6) to node {$\alpha_6$} (a8);
        \draw [->] (a6) to node {$\alpha_7$} (a7);

        \node (b1) [beta,left=of a3] {$\beta_1$};
        \node (b2) [beta,right=of a3] {$\beta_2$};
        \node (b4) [beta,below=of a1] {$\beta_4$};
        \node (b5) [beta,below right=of a2] {$\beta_5$};
        \node (b7) [beta,below=of a5] {$\beta_7$};
        \node (b8) [beta,below=of a6] {$\beta_8$};
        \node (b9) [beta,below=of a8] {$\beta_9$};
        \node (b10) [beta,below=of a7] {$\beta_{10}$};

        \draw [->] (a1) -- (b4);
        \draw [->] (b1) -- (a3);
        \draw [->] (a3) -- (b2);
        \draw [->] (a2) -- (b5);
        \draw [->] (a5) -- (b7);
        \draw [->] (a6) -- (b8);
        \draw [->] (a8) -- (b9);
        \draw [->] (a7) -- (b10);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容