geom_treebar_subgroup_border {ggtreebar} | R Documentation |
Subgroup Borders for Treemap Bar Charts
Description
Add borders to subgroups of a treemap bar chart generated by
geom_treebar()
or geom_treecol()
.
Usage
geom_treebar_subgroup_border(
mapping = NULL,
data = NULL,
stat = "count",
position = "stack",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
fixed = NULL,
layout = "squarified",
start = "bottomleft",
level = "subgroup",
...
)
geom_treecol_subgroup_border(
mapping = NULL,
data = NULL,
stat = "identity",
position = "stack",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
fixed = NULL,
layout = "squarified",
start = "bottomleft",
level = "subgroup",
...
)
geom_treebar_subgroup2_border(...)
geom_treecol_subgroup2_border(...)
geom_treebar_subgroup3_border(...)
geom_treecol_subgroup3_border(...)
Arguments
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
fixed |
Deprecated. Use |
layout |
The layout algorithm, one of either 'squarified' (the default), 'scol', 'srow' or 'fixed'. See Details for full details on the different layout algorithms. |
start |
The corner in which to start placing the tiles. One of 'bottomleft' (the default), 'topleft', 'topright' or 'bottomright'. |
level |
One of 'subgroup', 'subgroup2' or 'subgroup3', giving the
subgrouping level for which to draw borders. It is recommended to use the
aliases |
... |
Other arguments passed on to
|
Details
These functions take the same aesthetic mappings as geom_treebar()
and
geom_treecol()
, and are to be used in conjunction with them, ensuring that
arguments like position
match where supplied.
Value
See Also
geom_treebar()
, geom_treebar_subgroup_text()
.
Examples
library(ggplot2)
ggplot(diamonds, aes(y = clarity, fill = color, subgroup = color, subgroup2 = cut)) +
geom_treebar(position = "dodge") +
geom_treebar_subgroup_border(position = "dodge", linewidth = 2)