Skip to contents

Sunburst Plot

Usage

sunburst(
  data,
  textorientation = c("horizontal", "radial", "tangential"),
  verbose = FALSE,
  unit = "N"
)

Arguments

data

data.frame with three columns: Label, Parent and Value. See details for more information

textorientation

orientation sunburst labels. One of "horizontal", "radial", "tangential" (string)

verbose

verbose (boolean)

unit

would does count represent, e.g. 'reads' or 'samples' (string)

Value

plotly figure

Details

ColumnDescriptionType
LabelAll the terms to be represented in the sunburst plotcharacter
ParentParent of Labelcharacter
ValueValue - will determine size of segment in plotnumeric

Examples

data = data.frame(
  Label=c("E. coli","S. enterica", "L. monocytogenes", "Escherichia", "Salmonella", "Listeria"),
  Parent = c("Escherichia", "Salmonella", "Listeria",  "Bacteria", "Bacteria", "Bacteria"),
  Value = c(20, 10, 100,0, 0, 0)
)
sunburst(data)