geom_sankey_label: geom_sankey_label

geom_sankey_labelR Documentation

geom_sankey_label

Description

Creates centered labels or text in nodes of your sankey plot. Needs to have the exact same aesthetics as the call to 'geom_sankey' to work.

Usage

geom_sankey_label(
  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  space = NULL,
  type = "sankey",
  width = 0.1,
  inherit.aes = TRUE,
  ...
)

geom_sankey_text(
  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  space = NULL,
  type = "sankey",
  width = 0.1,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

provide you own mapping. both x and y need to be numeric.

data

provide you own data

position

change position

na.rm

remove missing values

show.legend

show legend in plot

space

space between nodes in the y-direction

type

Either 'sankey' which centers around the x axis or 'alluvial' which starts at y = 0 and moves upward.

width

width of nodes

inherit.aes

should the geom inherit aesthetics

...

other arguments to be passed to the geom

Value

ggplot layer


davidsjoberg/ggsankey documentation built on April 6, 2024, 2:37 a.m.