I am at the very beginning stage of Latex drawing using tikz. I am trying to draw a diagram like this enter image description here

The MWE that I tried is nowhere near the desired output.

  \draw circle(.5)--(-4,5);

Please help.

1 Answer 1


Your question it is similar to this. I have taken the code of the user @sergej and I have done some bit changhes:


\begin{tikzpicture}[node distance=2.3cm,->,>=stealth',auto,
  every edge/.append style={thick}]
  \node[state] (1) {$A$};
  \node[state] (2) [right of=1] {$R$};  
  \path (1) edge[loop left]  node{$S_1$} (1)
            edge[bend left]  node{$\scriptstyle S_2$}   (2)
        (2) edge[loop right] node{$S_4$}  (2)
            edge[bend left] node{$\scriptstyle S_3$}     (1);

enter image description here

  • 1
    Nice, It is really more similar to automata diagrams (DFA, NFA). Thanks, the code is fairly readable and understandable @Sebastiano
    – Bukaida
    May 25, 2021 at 6:24
  • @Bukaida I'm glady to help you. In this site there are same many questions that you can see manually. My best regards.
    – Sebastiano
    May 25, 2021 at 11:20

You must log in to answer this question.

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