Meaning of bend right or left in TikZ?


Solution 1

The arrow is curving to the left, but you are bending it to the right:

\draw [thick, -latex] (0,0) to (0,3);

\begin{tikzpicture}[trim left=0pt, trim right=0pt]
\draw [thick, -latex] (0,0) to [bend right] (0,3);
\draw [line width=5pt, -stealth, red!80!blue] (-1,1.5) -- (0.4,1.5);


Solution 2

Intead of drawing a straight line from (waiting) to (enter critical), you draw a bended line to the right of the expected direction.

Additionally, since the expected angle is 45-degrees, if you bend it another 45-degrees, the lines appears as departing on a 90-degrees angle.

Try this:

  • Draw the line without the bending, you'll see the "expected" line
  • Use the bend left option, to compare
  • play around with the bending angles.

Related videos on Youtube

Author by


Updated on October 29, 2020


  • wdg
    wdg about 3 years

    The following code actually comes from the PGF manual. It works fine, but I have a difficult time in understanding it (I'm new to TikZ)

    \documentclass{article} %  say
                 inner sep=0pt,minimum size=6mm},
                      inner sep=0pt,minimum size=4mm}]
    \node[place] (waiting) {};
    \node[place] (critical) [below=of waiting] {};
    \node[place] (semaphore) [below=of critical]{};
    \node[transition] (leave critical) [right=of critical]{};
    \node[transition] (enter critical) [left=of critical]{};
    \draw [->] (enter critical) to                 (critical);
    \draw [->] (waiting)        to [bend right=45] (enter critical);
    \draw [->] (enter critical) to [bend right=45] (semaphore);

    The above will give me something like this:

    enter image description here

    My question is: how shall I understand the two bend right? Regarding the long arrow starting from the circle at the top to square on the left side, it seems more like bending left to me. In what sense does it bend right? The same problem with the long arrow starting from the square on the left side to the circle at the bottom.

    • Sigur
      Sigur about 10 years
      Change right to left and see what happens!
  • Bakuriu
    Bakuriu about 10 years
    Is there a rationale behind this wording? I'd have preferred to have a curve right option instead of bend right = curve left.
  • Jake
    Jake about 10 years
    @Bakuriu: You can define curve left and curve right styles for that: \tikzset{curve left/.style={bend right=#1}, curve right/.style={bend left=#1}}