1

Here is my code

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage{pst-node}
\usepackage{tikz-cd}
\usepackage{tikz}
\usetikzlibrary{calc,arrows.meta,bending,automata,positioning,quotes}

\begin{document}

\begin{tikzpicture}[shorten >=1pt,node distance=4cm,on grid]
  \node[state] (c) {id};
  \node[state] (a) [above left of= c] {$a$};
  \node[state] (b) [above right of= c] {$b$};
  \path[->] (a) edge [bend right=40] node[above right] {$(0,1)$} (c);
  \path[->] (a) edge [bend left=40] node[below left] {$(1,2)$} (c);
  \path[->] (a) edge [bend right= 55] node[below left] {$(2,3)$} (c);
  \path[->] (a) edge [bend left= 55] node[above right] {$(3,0)$} (c);
  \path[->] (b) edge [bend right=20] node[above] {$(0,0)$} (a);
  \path[->] (b) edge [] node[above left] {$(1,1)$} (c);
  \path[->] (b) edge [bend right= 40] node[above] {$(2,2)$} (a);
  \path[->] (b) edge [loop right] node[right] {$(3,3)$} ();
  \path[->] (c) edge [loop below] node[below] {$(0,0)$} ();
  \path[->] (c) edge [in=240,out=290,loop] node[below] {$(1,1)$} ();
\end{tikzpicture}

\end{document}

This produces

enter image description here

How can I increase the size of the second loop?

  • 1
    Can you please make this into a minimal compilable example? So people haven't to guess the needed libraries and the definition of unknown commands. – egreg Jul 1 at 12:29
  • 1
    @egreg I apologize. I've been update my question – Corrêa Jul 1 at 12:34
  • No need to apologize! :-) – egreg Jul 1 at 12:47
1

Does this help?

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc,bending,automata,positioning}

\begin{document}

\begin{tikzpicture}[shorten >=1pt,node distance=4cm,on grid]
   \node[state] (c) {id};
   \node[state] (a) [above left of= c] {$a$};
   \node[state] (b) [above right of= c] {$b$};
   \path[->] (a) edge [bend right=40] node[above right] {$(0,1)$} (c);
   \path[->] (a) edge [bend left=40] node[below left] {$(1,2)$} (c);
   \path[->] (a) edge [bend right= 55] node[below left] {$(2,3)$} (c);
   \path[->] (a) edge [bend left= 55] node[above right] {$(3,0)$} (c);
   \path[->] (b) edge [bend right=20] node[above] {$(0,0)$} (a);
   \path[->] (b) edge [] node[above left] {$(1,1)$} (c);
   \path[->] (b) edge [bend right= 40] node[above] {$(2,2)$} (a);
   \path[->] (b) edge [loop right] node[right] {$(3,3)$} ();
   \path[->] (c) edge [loop below] node[below] {$(0,0)$} ();
   \path[->] (c) edge [scale=5,in=240,out=300,loop] node[below] {$(1,1)$} ();
\end{tikzpicture}

\end{document}
| improve this answer | |
  • This codes produce what I wanted, but complies with an error. – Corrêa Jul 1 at 12:47
  • 1
    I fixed the error, which was not in your code. Thanks! – Corrêa Jul 1 at 12:49
  • You are welcome. Maybe someone comes up with a more elegant solution. – Philipp Imhof Jul 1 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.