1

I'm beginner in tikz package. Recently, with help of this site, I learned to build basic diagrams (graphs, trees), but I still don't understand these constructions the way I would like. I'm trying to draw the following diagram

enter image description here

I can't draw the curved arrows in the diagram. I would like help!

1 Answer 1

4

By default there are keys for loops left, right, above and below, but one can easily define a version for arbitrary angles, which allows one to modify also the opening angles and looseness, which controls how "long" the loop is.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,automata,positioning,quotes}
\begin{document}
\begin{tikzpicture}[angle loop/.style={out=#1+30,in=#1-30,loop,looseness=15},
    >={Stealth[bend]},auto,every state/.append style={minimum size=1.5em}]
    \node[state] (A){};
    \node[state,right=2cm of A] (B){};
    \path[->] (A) edge[angle loop=180,"{$(1,0)$}"] (A)
        (A) edge["{$(0,1)$}"] (B)
        (B) edge[angle loop=60,"{$(0,0)$}"] (B)
        (B) edge[angle loop=-60,"{$(1,1)$}"] (B);
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .