When there are two nodes pointing to the same node, the picture looks odd because they point to the same location. How can I change the location of pointing?

For instance,




    \begin{tikzpicture}[shorten >=1pt,node distance=3cm,on grid,auto] 
        \node[state,initial,accepting]      (q_0)                           {$q_0$};
        \node[state,accepting]              (q_1)   [right=of q_0]          {$q_1$};
        \node[state]                        (q_2)   [right=of q_1]          {$q_2$};    
        \node[state,accepting]              (q_3)   [right=of q_2]          {$q_3$}; 
        \node[state]                        (q_4)   [above right=of q_3]    {$q_4$};    
        \node[state,accepting]              (q_5)   [below right=of q_3]    {$q_5$};        

        (q_0)   edge    [bend right]        node {0}            (q_1)
        (q_0)   edge    [bend right]        node {1}            (q_3)

        (q_1)   edge    [above,bend right]  node {0}            (q_0)
        (q_1)   edge    [above,bend right]  node {0}            (q_3)

        (q_2)   edge                        node {0}            (q_1)
        (q_2)   edge    [above,bend left]   node {0}            (q_4)

        (q_3)   edge                        node {0,1}          (q_5)

        (q_4)   edge                        node {0,1}          (q_3)
        (q_5)   edge    [loop below]        node {0,1}          (q_1)

        ; %end path 

Output of code

What I want to achieve is one arrow to point to below the circle and the other point to somewhere else.


You can fix output and input angle with in and out options

(q_0) edge [bend right, out=-60, in=240] node {1} (q_3)

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.