怎样在 latex 中绘制此图?
任何帮助将不胜感激。
答案1
这里只是一个开始,展示了连接两个节点的三种不同方式:直线(--
)、曲率有限的弯曲线(to[bend ...]
)和灵活性更高但更复杂的弯曲线(.. controls +() and +() ..
)。
\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
[decoration={markings,mark=at position 0.5 with {\arrow{stealth}}},
blob/.style={circle,fill,minimum width=2pt,inner sep=0pt},
flow/.style={postaction={decorate}}
]
\node[blob,label=above:N] (N) at (0, 0) {};
\node[blob,label=below:S] (S) at (0,-3) {};
\draw[flow] (S) .. controls +(-1.5,0) and +(-1.5,0) .. node[left]{$a_1$} (N);
\draw[flow] (S) to[bend left=40]node[left]{$a_2$} (N);
\draw[flow] (S) -- node[left] {$a_3$} (N);
\draw[flow] (S) to[bend right=40]node[right]{$a_4$} (N);
\draw[flow] (S) .. controls +(1.5,0) and +(1.5,0) .. node[right]{$a_5$} (N);
\end{tikzpicture}
\end{document}