Tx · LaTeX & TikZ

What Do “Bend Left” and “Bend Right” Mean in TikZ?

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose a to path

    Use bend left or bend right on a TikZ to or edge operation, not on a straight -- segment.

  2. 2. Read the direction

    Left and right are relative to the direction from the path’s start point to its end point.

  3. 3. Adjust the angle

    Add an angle, such as bend left=45, to change the curve’s departure and arrival directions.

  4. 4. Check the arrow

    The arrow still points from the first coordinate toward the second, regardless of which side the curve bows toward.

TikZ’s bend left and bend right options control which side a curved path bows toward. They are most often used to draw curved arrows between nodes, especially when several connections would otherwise overlap.

The direction matters: “left” is determined while traveling from the path’s start to its end. Reversing the endpoints reverses which side counts as left.

Use the options on a to or edge path

Write the option in brackets after to:

\draw[->] (A) to[bend left] (B);

You can also use it with an edge operation:

\draw[->] (A) edge[bend right] (B);

The arrow tip, if present, still points from the first coordinate to the second. The bend changes the route between them, not the direction of travel.

What “left” means

Imagine traveling along the straight line from the starting point to the ending point. bend left makes the curve bow to your left; bend right makes it bow to your right. For a path from left to right on the page, left is usually upward and right is downward. If the path runs in another direction, the curve rotates with it.

The default bend angle is 30 degrees. You can specify a different angle, for example:

\draw[->] (A) to[bend left=45] (B);

The angle affects the directions at which the curve leaves and approaches its endpoints. It is not a radius or a guarantee of a particular distance between the curve and the straight line. The endpoint positions and other path settings also influence the resulting shape. For a left-to-right horizontal path, bend left=30 corresponds to the familiar departure and arrival angles of 30 and 150 degrees; for a path with a different orientation, TikZ adjusts the bend relative to that path.

Worked example: arrows in opposite directions

This complete example draws two arrows between the same nodes. The first travels from A to B and bends left; the second travels back from B to A and also bends left. Because the direction is reversed, the two curves bow to opposite sides of the connection.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[>=Stealth]
  \node[draw, circle] (A) at (0,0) {A};
  \node[draw, circle] (B) at (3,0) {B};

  \draw[->, blue] (A) to[bend left=30]
    node[midway, above, fill=white] {A to B} (B);
  \draw[->, red] (B) to[bend left=30]
    node[midway, below, fill=white] {B to A} (A);
\end{tikzpicture}
\end{document}

The example uses the tikz package and the arrows.meta library. >=Stealth selects an arrow-tip style, and midway places each label halfway along its curved path. The node names identify the endpoints; the coordinates set their positions.

Common mistakes

  • Putting the option on --: -- creates a straight line segment. Use to[bend left] or edge[bend left] when you want a bend.
  • Expecting “left” to mean page-up: Left is relative to the direction from start to end, not a fixed direction on the page.
  • Reversing endpoints without checking the curve: If you reverse a path, left and right reverse too. This is useful for separating arrows, but can surprise you if you expected the same curve.
  • Treating the angle as a radius: bend left=45 changes the curve’s endpoint directions; it does not specify a fixed radius or offset.
  • Using a bend to change the arrow direction: The order of the endpoints determines the arrow’s direction. Change that order if the arrow should point the other way.

References

  1. The TikZ and PGF Packages: Manual

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.