Each observation is a line crossing one vertical axis per variable — the standard way to eyeball high-dimensional structure and clusters. Each axis is independently rescaled to [0, 1] by the stat, so variables in different units are comparable.

geom_parallel(
  mapping = NULL,
  data = NULL,
  color = NULL,
  alpha = NULL,
  linewidth = NULL
)

Arguments

mapping, data

Standard layer overrides. Map the variable to x, the value to y, and the observation id to group.

color, alpha, linewidth

Appearance.

Value

A Layer to add with +.

Examples

d <- data.frame(
  id = rep(1:3, each = 3),
  var = rep(c("a", "b", "c"), 3),
  val = c(1, 9, 4, 3, 5, 8, 7, 2, 6)
)
ggnext(d, aes(var, val, group = id, color = factor(id))) + geom_parallel()
#> <ggnext plot>
#>   data:  9 x 3
#>   aes:   x = var, y = val, group = id, color = factor(id)
#>   layers: 1 
#>   coord: cartesian
#>   mode:  static