SankeyPlotAtomic {plotthis}R Documentation

Atomic Sankey plot

Description

Plot a Sankey plot without splitting the data.

Usage

SankeyPlotAtomic(
  data,
  y = NULL,
  nodes_by,
  nodes_color = "grey30",
  links_by = NULL,
  links_by_sep = "_",
  links_name = NULL,
  nodes_palette = "Paired",
  nodes_palcolor = NULL,
  nodes_alpha = 1,
  nodes_label = FALSE,
  links_palette = "Paired",
  links_palcolor = NULL,
  links_alpha = 0.6,
  legend.box = "vertical",
  x_text_angle = 0,
  aspect.ratio = 1,
  legend.position = "right",
  legend.direction = "vertical",
  theme = "theme_this",
  theme_args = list(),
  title = NULL,
  subtitle = NULL,
  xlab = NULL,
  ylab = NULL,
  ...
)

Arguments

data

A data frame.

y

A character string of the column name to plot on the y-axis. A numeric column is expected. If NULL, the count of each nodes_by column will be used.

nodes_by

A character vector of column names to define the nodes.

nodes_color

A character string to color the nodes.

links_by

A character vector of column names to define the links. If NULL, the links_by will be the first column in nodes_by.

links_by_sep

A character string to concatenate the columns in links_by, if multiple columns are provided.

links_name

A character string to name the legend of links.

nodes_palette

A character string to specify the palette of nodes.

nodes_palcolor

A character vector to specify the colors of nodes.

nodes_alpha

A numeric value to specify the transparency of nodes.

nodes_label

A logical value to show the labels on the nodes.

links_palette

A character string to specify the palette of links.

links_palcolor

A character vector to specify the colors of links.

links_alpha

A numeric value to specify the transparency of links.

legend.box

A character string to specify the box of the legend, either "vertical" or "horizontal".

x_text_angle

A numeric value specifying the angle of the x-axis text.

aspect.ratio

A numeric value specifying the aspect ratio of the plot.

legend.position

A character string specifying the position of the legend. if waiver(), for single groups, the legend will be "none", otherwise "right".

legend.direction

A character string specifying the direction of the legend.

theme

A character string or a theme class (i.e. ggplot2::theme_classic) specifying the theme to use. Default is "theme_this".

theme_args

A list of arguments to pass to the theme function.

title

A character string specifying the title of the plot. A function can be used to generate the title based on the default title. This is useful when split_by is used and the title needs to be dynamic.

subtitle

A character string specifying the subtitle of the plot.

xlab

A character string specifying the x-axis label.

ylab

A character string specifying the y-axis label.

...

Additional arguments.

Value

A ggplot object


[Package plotthis version 0.4.0 Index]