Layout as arc using the alter package.

layout_arc(
  g,
  sourceWeight = NULL,
  targetWeight = NULL,
  thickness = 0.05,
  marginRatio = 0.1
)

Arguments

g

An object of class g2r or g2Proxy as returned by g2() or g2_proxy().

sourceWeight, targetWeight

Bare name of column containing weights of source and target in the edges data.frame.

thickness

Node height, between 0 and 1.

marginRatio

Space ratio, between 0 and 1.

Examples

ig <- igraph::erdos.renyi.game(100, 1 / 100)

g2(ig, asp(x, y)) %>%
  layout_arc() %>%
  fig_edge(asp(color = source, shape = "arc"), opacity = .3) %>%
  fig_point(asp(color = id, shape = "circle", size = value)) %>%
  coord_type("polar") %>%
  coord_reflect("y") %>%
  axis_hide()

g2(ig, asp(x, y)) %>%
  layout_arc() %>%
  fig_edge(asp(color = source, shape = "arc"), opacity = .3) %>%
  fig_point(asp(color = id, shape = "circle", size = value))