Brief ggarrow update

Pointing out the new features.
package
update
Author

Teun van den Brand

Published

September 2, 2026

Photo by Timothy Huliselan on pexels

I’m not gonna spend many words when few do: I have a new update for the ggarrow R package, and these are the new features.

Setup code
library(ggarrow)
#> Loading required package: ggplot2

df <- data.frame(
  x = c(1, 3, 3, 1, 1, 2, 2, 3),
  y = c(1, 2, 2, 1, 1, 3, 3, 2),
  g = rep(LETTERS[1:4], each = 2)
)

base <- ggplot(df, aes(x, y, colour = g)) +
  geom_point(colour = "black", size = 5) +
  coord_equal() +
  theme(geom = element_geom(linewidth = 1))

Parallel arrows

You can use the sep argument to separate arrows whose path are the same (or reversed). It takes the number of millimetres to space apart co-located arrows 1. In this example, it applies to arrows A and B.

base + geom_arrow(sep = 5, resect = 5)

Half-arrows

There are new arrowheads: arrow_head_halfwing() and arrow_head_halfline(). The direction argument control which side of the line displays them.

half_arrow <- arrow_head_halfwing(direction = -1)
base + geom_arrow(sep = 1.5, resect = 5, arrow_head = half_arrow)

Distortions

The new experimental distort argument can be used to pattern the shafts of arrows. The vignette has more details to peruse.

oscillate <- distort_sinewave()
base + geom_arrow(distort = oscillate)

That about covers it, thanks for reading!

Footnotes

  1. The resect argument antedates this release, but can be used to detach arrows from points.↩︎