Skip to contents

Extracts a subtree rooted at the specified node and recomputes coordinates so the subtree fills the full angular space. The result is a new sunburst_data object compatible with all plot functions.

Usage

drilldown(sb, node, ...)

Arguments

sb

A sunburst_data object.

node

Node to use as the new root. Character string (node name) or integer (node ID).

...

Override parameters for the recomputation (e.g., xlim, rot).

Value

A new sunburst_data object rooted at the selected node.

See also

sunburst_data() for creating the initial data, sunburst(), icicle(), donut() for plotting.

Examples

sb <- sunburst_data("((a, b)X, (c, d)Y)root;")
# Drill into the X subtree (containing a, b)
sub <- drilldown(sb, node = "X")
sunburst(sub, fill = "name")