1

Consider the following code:

\begin{tikzpicture}[node distance=4cm]
    \node[state,initial, initial text=O] (q0) {$q_0$};
    \node[state,right=3cm of q0] (q1) {$q_1$};
    \node[state,right=3cm of q1] (q2) {$q_2$};
    \node[state,right=3cm of q2] (q3) {$q_3$};
    \draw (q0) edge[bend left] node{true} (q3);
    \draw (q0) edge[bend left=2cm] node{false} (q3);
    \draw (q0) edge[bend left=4cm] node{predicate} (q3);
\begin{tikzpicture}[node distance=4cm]

This is the result: The result I don't want

I thought that adding values to bend left may make these edges more apart from each other. But it doesn't. How can I resolve that ?

SebGlav
  • 19,186

1 Answers1

2

I just copied and pasted your code snippet so no tikzset are taken in account. Next time, please include a complete minimal working example (MWE) in your question.

In the following you can see two different options, one with bend and looseness, and one with out=<>,in=<> and looseness.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{automata,positioning}

\begin{document}

\begin{tikzpicture}[node distance=4cm] \node[state,initial, initial text=O] (q0) {$q_0$}; \node[state,right=3cm of q0] (q1) {$q_1$}; \node[state,right=3cm of q1] (q2) {$q_2$}; \node[state,right=3cm of q2] (q3) {$q_3$}; \draw (q0) edge[bend left] node[above]{true} (q3); \draw (q0) edge[bend left=2cm,looseness=1] node[above]{false} (q3); \draw (q0) edge[out=90,in=90,looseness=1.5] node[above]{predicate} (q3); \end{tikzpicture}

\end{document}

bend

SebGlav
  • 19,186