geom_treemap() is used with a
aesthetic to subgroup treemap tiles,
be used to draw a border around each subgroup at the appropriate level.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
geom_treemap_subgroup_border( mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, fixed = NULL, layout = "squarified", start = "bottomleft", level = "subgroup", ... ) geom_treemap_subgroup2_border(...) geom_treemap_subgroup3_border(...)
geom arguments as for
The layout algorithm, one of either 'squarified' (the default), 'scol', 'srow' or 'fixed'. See Details for full details on the different layout algorithms.
The corner in which to start placing the tiles. One of 'bottomleft' (the default), 'topleft', 'topright' or 'bottomright'.
One of 'subgroup', 'subgroup2' or 'subgroup3', giving the
subgrouping level for which to draw borders. It is recommended to use the
geom_treemap_subgroup_border() geoms require
subgroup2, subgroup3‘) aesthetics. Several other standard ’ggplot2'
aesthetics are supported (see Aesthetics).
Note that 'ggplot2' draws plot layers in the order they are added to the
plot. This means that if you add a
followed by a
geom_treemap_subgroup2_border() layer, the second layer will
be drawn on top of the first and may hide it.
layout argument is used to set the treemap layout algorithm. All
'treemapify' geoms added to a plot should have the same value for
start, or they will not share a common layout (see
details on the layout algorithms).
subgroup, subgroup2 or subgroup3 (required)
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.