# How can I draw a very simple diagram in Tikz?

I want to draw a diagram consisting of a dot and an arrow that start from above the dot, curls round in a loop and ends back to the right of the dot, like:

However, I don't know Tikz well enough, and what I produce looks like fly-droppings. How can I do this?

• What have you tried? Even fly-droppings are helpful to us. – user156344 May 17 at 10:02

These are exact arcs:

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,bending}
\begin{document}
\begin{tikzpicture}[>={Stealth[flex]}]
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:0] (0) at (0,0) {};
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:1] (1) at (4,0) {};
\draw[->] ([xshift=.5cm]0.east) -- ([xshift=-.5cm]1.west);
\draw[->] (0.center)++(0,.35)++(-120:.35) arc (240:-60:.35);
\draw[->] (1.center)++(0,.35)++(-120:.35) arc (240:-60:.35);
\end{tikzpicture}
\end{document}


These are better arcs:

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,bending}
\begin{document}
\begin{tikzpicture}[>={Stealth[flex]}]
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:0] (0) at (0,0) {};
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:1] (1) at (4,0) {};
\draw[->] ([xshift=.5cm]0.east) -- ([xshift=-.5cm]1.west);
\draw[->] (0.center)++(0,.45)++(-120:.35) arc (240:-60:.35);
\draw[->] (1.center)++(0,.45)++(-120:.35) arc (240:-60:.35);
\end{tikzpicture}
\end{document}


These are not circular arcs though, but what I recommend:

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,bending}
\begin{document}
\begin{tikzpicture}[>={Stealth[flex]}]
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:0] (0) at (0,0) {};
\node[circle,fill=black,inner sep=0pt,
minimum size=4pt,label=below:1] (1) at (4,0) {};
\node[circle,minimum size=.8cm] (0x) at (0,0) {};
\node[circle,minimum size=.8cm] (1x) at (4,0) {};
\draw[->] (0x) -- (1x);
\draw (0x) edge[out=120,in=60,loop] ();
\draw (1x) edge[out=120,in=60,loop] ();
\end{tikzpicture}
\end{document}


If exact circles are not necessary, the following simple approach can be utilized...

## Code

\documentclass[border=3pt]{standalone}

\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{tikzpicture}
\node (A) at (0,0) {};
\node (B) at (3,0) {};
%
\fill (A) circle (1.5pt) node[below] {0};
\fill (B) circle (1.5pt) node[below] {1};
%
\draw[-Stealth,thick] (A) -- (B);
\draw[-stealth,gray] (A) to[out=130,in=50,looseness=10] (A);
\draw[-stealth,gray] (B) to[out=130,in=50,looseness=10] (B);
\end{tikzpicture}

\end{document}