如何在图中同一顶点绘制两个循环

如何在图中同一顶点绘制两个循环

我想画一个有两个循环的图无指向的在同一顶点,如下图所示: 具有两个循环的图 我画了两个循环,但是很丑,代码如下:

\begin{tikzpicture}
\draw[fill=black] (2,-1) circle (3pt);
\draw[fill=black] (2,0) circle (3pt);
\draw[fill=black] (2,2) circle (3pt);
\node at (2.5,-1) {$z$};
\node at (2.4,0.1) {$x.y$};
\node at (2,2.3) {$w$};
\draw[thick] (2,0) edge[bend right] (2,2);
\draw[thick] (2,0) edge[bend left] (2,2);
\draw[thick] (2,-1) edge[bend right] (2,0);
\draw[thick] (2,-1) edge[bend left] (2,0);
\draw (2,0) edge [loop left] (2,0);
\draw (2,0) edge [loop below] (2,0);
\end{tikzpicture}

答案1

这就是你喜欢的吗?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\coordinate (W) at (2,2);
\coordinate (XY) at (2,0);
\coordinate (Z) at (2,-1);
\draw[fill=black] (Z) circle (3pt) node[below=1mm] {$z$};
\draw[fill=black] (XY) circle (3pt) node[right=7mm] {$x.y$};
\draw[fill=black] (W) circle (3pt) node[above=1mm] {$w$};
\draw[thick] (XY) edge[bend right] (W);
\draw[thick] (XY) edge[bend left] (W);
\draw[thick] (Z) edge[bend right] (XY);
\draw[thick] (Z) edge[bend left] (XY);
\draw (XY) edge [loop left, min distance=10mm] (XY);
\draw (XY) edge [loop right, min distance=10mm] (XY);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容