答案1
带有圆形环和弯曲箭头。这可以通过arc
在某些to path
构造中使用来实现。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,calc}
\begin{document}
\begin{tikzpicture}[carrow/.style={to path={%
($(\tikztotarget)+(#1:\pgfkeysvalueof{/tikz/cradius})+(#1+170:\pgfkeysvalueof{/tikz/cradius})$)
arc[start angle=#1+170,end angle=#1-170,radius=\pgfkeysvalueof{/tikz/cradius}]},
->},dot/.style={circle,inner sep=1.2pt,fill,outer sep=0.5ex},
cradius/.initial=0.4,
>={Latex[bend]},bend angle=12]
\path node[dot,label=225:{$a$}](a){}
++ (45:1.5) node[dot,label=45:{$b$}](b){}
++ (-30:1.5) node[dot,label=90:{$c$}](c){}
($(a)+(0,-1.8)$) node[dot,label=225:{$d$}](d){}
++ (1.5,0.1) node[dot,label=225:{$f$}](f){}
++ (1.5,-0.3) node[dot,label=-120:{$e$}](e){}
++ (0:1.8) node[dot,label=-60:{$h$}](h){}
++ (120:1.8) node[dot,label=90:{$g$}](g){};
\path[shorten >=1ex, shorten <=0.5ex,semithick]
(a) edge[->,bend left] (b) edge[carrow=45] (b)
(b) edge[->,bend left] (a) edge[carrow=-135,<-] (a)
edge[carrow=-135,<-] (d)
edge[carrow=-135,<-] (f)
edge[carrow=-120] (e)
edge[carrow=-60,<-] (h)
edge[carrow=90,<-] (g)
edge[carrow=90,<-] (c)
(e) edge[->,bend left] (g)
(g) edge[->,bend left] (e)
(h) edge[->,bend left] (g)
(g) edge[->,bend left] (h)
(e) edge[->,bend left] (h)
(h) edge[->,bend left] (e);
\end{tikzpicture}
\end{document}
答案2
图像的一部分:
\documentclass[margin=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, automata,
positioning}
\begin{document}
\begin{tikzpicture}[
> = Stealth,
node distance = 22mm,
every edge/.style = {->, draw, thick, bend angle=15},
every label/.style= {inner sep=1pt, font=\small},
dot/.style = {circle, fill, inner sep=1mm, outer sep=1mm}
]
\node (a) [dot,label=above:a] {};
\draw (a) edge[out=225, in=315, looseness=9] (a);
%
\node (b) [dot,label=below:b, right=of a] {};
\draw (b) edge[out=225, in=315, looseness=9] (b);
%
\node (c) [dot,label=below:c, right=of b] {};
\node (d) [dot,label=above:d, above right=of c] {};
\node (e) [dot,label=below:e, below right=of d] {};
\draw (c) edge[out=225, in=315, looseness=9] (c)
(c) edge[bend right] (d)
(d) edge[bend right] (c)
(d) edge[out=135, in= 45, looseness=9] (d)
(d) edge[bend right] (e)
(e) edge[bend right] (d)
(e) edge[out=225, in=315, looseness=9] (e)
(e) edge[bend right] (c)
(c) edge[bend right] (e);
\end{tikzpicture}
\end{document}
对于其他循环方向,您需要选择适当的out
角度in
。