连接节点的逆时针路径曲线

连接节点的逆时针路径曲线

我有一个问题,对于大多数人来说无疑很简单,但我已经为此苦苦挣扎了一段时间。我有以下代码:

\begin{tikzpicture}

% Add information on the process above the thermocline
\node [text width=1cm,align=center,font = \scriptsize] (A) at (7.5,6) {A};
\node [text width=1cm,align=center,font = \scriptsize]  (B) at (6.5,5.5) {B};
\node [text width=1cm,align=center,font = \scriptsize] (C) at (7.5,4.75) {C};
\node [text width=1cm,align=center,font = \scriptsize]  (D) at (8.5,5.5) {D};

\draw [->] (A.west)--(B.north);
\draw [->] (B.south)--(C.west);
\draw [->] (C.east)--(D.south);
\draw [->] (D.north)--(A.east);

\end{tikzpicture}

返回:

在此处输入图片描述

我怎样才能改变这些线使它们变成弯曲的,此外我希望它几乎是一个圆圈,节点写在弯曲路径的顶部,从而导致这些节点所在的圆圈中出现间隙。

答案1

以下是与您想要的类似的东西:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm, thick,main node/.style={font=\sffamily\Large\bfseries}]
  \node[main node] (1) {A};
  \node[main node] (2) [below left of=1] {B};
  \node[main node] (3) [below right of=2] {C};
  \node[main node] (4) [below right of=1] {D};

  \path[every node/.style={font=\sffamily\small}]
    (1) edge [bend right] node[left] {} (2)
    (2) edge [bend right] node[left] {} (3)
    (3) edge [bend right] node[right] {} (4)
    (4) edge [bend right] node[right] {} (1);
\end{tikzpicture}
\end{document}

导致:

在此处输入图片描述

这是修改后的示例示例

相关内容