Creates an icicle plot where different depth levels can use different
fill colour mappings. Uses ggnewscale::new_scale_fill() to enable
multiple fill scales in a single plot.
Arguments
- sb
A
sunburst_dataobject fromsunburst_data().- fills
A named list mapping depth levels (as character strings) to column names in
sb$rectsfor fill mapping. E.g.,list("1" = "name", "2" = "value").- colour
Border colour for rectangles. Default
"white".- linewidth
Border line width. Default
0.2.- ...
Passed to
ggplot2::geom_rect().
See also
sunburst_multifill() for the polar variant,
icicle() for single-scale fill.
Examples
sb <- sunburst_data("((a, b, c), (d, e));")
if (requireNamespace("ggnewscale", quietly = TRUE)) {
icicle_multifill(sb, fills = list("1" = "name", "2" = "name"))
}
