I want to generate the figure on the right. I am sending the code shown on the left.

can anybody help me?

Thank you!

 \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,semithick]
  \tikzstyle{every state}=[fill=green!50!black,draw=none,text=white]

  \node[state]         (X)                {$X$};



enter image description here

  • 4
    Please do not just provide a snippet but a MWE (minimal working example). It's much easier than having to build the document preamble stuff ourselves and you will more likely get an answer. Besides that: Welcome to TSX Aug 20, 2016 at 19:24
  • 2
    the arrow cap on the right is called Bar on the TikZ documentation (not stealth)
    – d-cmst
    Aug 20, 2016 at 19:28
  • 2
    Please fix your code first.
    – CroCo
    Aug 20, 2016 at 19:36

1 Answer 1


I'm guessing that you looking for something like this:

enter image description here

(I show both arrows on one node). The MWE for above image is:


       > = Stealth,
 every edge/.append style = {draw, semithick, shorten >=1pt},
          bar edge/.style = {semithick, -{Bar[width=3mm,line width=1pt]}},
every state/.append style = {draw=none, fill=green!50!black, text=white}
\node (X) [state]  {$X$};
\path[->]       (X) edge [out=120,in=60,distance=15mm,swap,"1" ']   (X);
\path[bar edge] (X) edge [out=-120,in=-60,distance=15mm,swap,"1"]   (X);

From code in question can be concluded (regarding used obsolete syntax) that you haven't recent TikZ package (3.0.1). Also is used a command which not exist in tikz package.

You must log in to answer this question.

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