Bend arrows in TikZ.
You can curve an arrow between nodes using the bend left or bend right keys, or by specifying exact angles with out and in. For complex curves, these options give you full control over the path's shape and the arrow tip's alignment.
The short answer: use bend left or bend right for quick curves between nodes. For custom arcs, use to[out=..., in=...] to define the start and end angles.
Use bend left and bend right
| Command | Effect |
|---|---|
bend left | Curves counter-clockwise |
bend right | Curves clockwise |
bend left=45 | Deeper curve |
bend right=90 | Semi-circle bend |
The fastest way to curve a connection between two nodes is to add the bend keys to your edge or draw command. These keys automatically calculate a circular arc between your points.
You can control the intensity of the curve by passing an optional angle. A higher value creates a deeper, more pronounced bend.
Control curves with out and in
| Option | Usage |
|---|---|
out=angle | Starting direction in degrees |
in=angle | Ending direction in degrees |
looseness=N | Adjusts how much the path pulls away from the straight line |
When you need more precision than a standard circular bend, use the out and in keys. These define the angle at which the path leaves the starting node and enters the destination node.
This approach is better for paths that need to avoid other elements or follow a specific trajectory.
Align arrow tips on curves
| Feature | Requirement |
|---|---|
| Library | \usetikzlibrary{arrows.meta, bending} |
| Arrow tip | [-{Latex[bend]}] |
By default, an arrow tip on a curved path might look rigid or misaligned. The bending library fixes this by allowing the arrow tip itself to curve along the path.
Load the library in your preamble and add the bend option to your arrow tip specification.
Questions
Why does my arrow tip look ugly on a curved line?
Arrow tips are rigid by default. Use the bending library and add the bend option to your arrow tip (e.g., Latex[bend]) to make the tip follow the curve of the path.
How do I draw an arc instead of a bend?
Use the arc command with start angle, end angle, and radius. This is ideal for circular segments rather than paths between two nodes.
Can I use bend keys with the path command?
Yes. You can use edge[bend left] within a \path command to connect nodes while keeping your code clean.
What is the difference between out/in and bend?
The bend keys create a standard circular arc. The out and in keys give you full control over the tangent angles at both ends, allowing for non-circular, complex curves.
How do I shorten the arrow tip?
Use the arrows.meta library and define the length in the arrow tip options, such as Stealth[length=3mm].
Try your own paper in Texeno.
Start free, upload a project as a .zip and press Recompile. Upgrade when you need longer compiles.
Start writing