A quadratic curve between two points, for annotation leaders and relationship diagrams where a straight segment would overlap the data.

geom_curve(
  mapping = NULL,
  data = NULL,
  curvature = NULL,
  color = NULL,
  linewidth = NULL,
  alpha = NULL
)

Arguments

mapping, data

Standard layer overrides. Requires x, y, xend, yend.

curvature

How far the curve bows; negative bows the other way.

color, linewidth, alpha

Appearance.

Value

A Layer to add with +.

Examples

d <- data.frame(x = 1, y = 1, xe = 3, ye = 3)
ggnext(d, aes(x, y, xend = xe, yend = ye)) + geom_curve()
#> <ggnext plot>
#>   data:  1 x 4
#>   aes:   x = x, y = y, xend = xe, yend = ye
#>   layers: 1 
#>   coord: cartesian
#>   mode:  static