关系图

关系图

在此处输入图片描述

我是刚开始使用 LaTex,不知道如何绘制这种关系图。我试过了,但没有画出来,你能帮我吗?非常感谢。

答案1

下面是使用 TikZ 的直接方法。(对于指向点本身的箭头的代码,您可以看到,例如,这个答案

在此处输入图片描述

\documentclass[tikz,border=1mm]{standalone}

\begin{document}

\begin{tikzpicture}
    % Dots
    \fill (0,0) circle (.5mm);
    \fill (0,1) circle (.5mm);
    \fill (-0.866,-0.5) circle (.5mm);
    \fill (0.866,-0.5) circle (.5mm);
    % Labels
    \node at (0,0.2) {$e$};
    \node at (0,1.2) {$c$};
    \node at (-1,-0.7) {$d$};
    \node at (1,-0.7) {$b$};
    % Arrows
    \draw[green,-stealth] (0,1) to [bend right=50] (-0.866,-0.5);
    \draw[green,-stealth] (-0.866,-0.5) to [bend right=50] (0.866,-0.5);
    \draw[green,-stealth] (0.866,-0.5) to [bend right=50] (0,1);
    \draw[blue,-stealth] (-0.866,-0.5) to [bend right=20] (0,1);
    \draw[blue,-stealth] (0,1) to [bend right=20] (0.866,-0.5);
    \draw[blue,-stealth] (0.866,-0.5) to [bend right=20] (-0.866,-0.5);
    \draw[red,-stealth] (0,1) arc (270:-90:3mm);
    \draw[red,-stealth] (-0.866,-0.5) arc (420:60:3mm);
    \draw[red,-stealth] (0.866,-0.5) arc (480:120:3mm);
\end{tikzpicture}

\end{document}

答案2

在此处输入图片描述

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}% for arrow tip stealth'
\begin{document}
\begin{tikzpicture}[
  dot/.style={minimum size=0pt,inner sep=1.5pt,circle,fill},
  >=stealth'
  ]
  \newcommand\R{1.5}% radius of circle with e in the center
  \node[dot,label={[above]$e$}] (e) {};% e is in the center
  \node[dot,label={[above]$c$}] (c) at (90:\R) {};% 90 degrees = north, distance \R from e
  \node[dot,label={[below left]$d$}] (d) at (210:\R) {};% 210 degrees = south west, distance \R from e 
  \node[dot,label={[below right]$b$}] (b) at (330:\R) {};% 330 degrees is south east, distance \R from e
  \path[->] (b) edge[bend right] (c)
                edge[bend right=10] (d)
            (c) edge[bend right] (d)
                edge[bend right=10] (b)
            (d) edge[bend right] (b)
                edge[bend right=10] (c);
  \draw[->] (b) to[out=20,in=280,looseness=18] (b);
  \draw[->] (c) to[out=140,in=40,looseness=18] (c);
  \draw[->] (d) to[out=260,in=160,looseness=18] (d);
\end{tikzpicture}
\end{document}

相关内容