View source: R/layout_partition.R
layout_tbl_graph_partition | R Documentation |
The partition layout is a way to show hierarchical data in the same way as
layout_tbl_graph_treemap()
. Instead of subdividing the parent area
the partition layout shows the division of a nodes children next to the area
of the node itself. As such the node positions will be very reminiscent of
a reingold-tilford tree layout but by plotting nodes as areas it better
communicate the total weight of a node by summing up all its children.
Often partition layouts are called icicle plots or sunburst diagrams (in case
a radial transform is applied).
layout_tbl_graph_partition(
graph,
weight = NULL,
circular = FALSE,
height = NULL,
sort.by = NULL,
direction = "out",
offset = pi/2,
const.area = TRUE
)
graph |
An |
weight |
An optional node variable to use as weight. Will only affect the weight of leaf nodes as the weight of non-leaf nodes are derived from their children. |
circular |
Logical. Should the layout be transformed to a circular
representation. If |
height |
An optional node variable to use as height. If |
sort.by |
The name of a node variable to sort the nodes by. |
direction |
The direction of the tree in the graph. |
offset |
If |
const.area |
Logical. Should 'height' be scaled for area proportionality
when using |
If circular = FALSE
A data.frame with the columns x
,
y
, width
, height
, leaf
,
depth
, circular
as well as any information stored as node
variables in the tbl_graph object.
If circular = TRUE
A data.frame with the columns x
, y
,
r0
, r
, start
, end
, leaf
,
depth
, circular
as well as any information stored as node
variables in the tbl_graph object.
partition is a layout intended for trees, that is, graphs where nodes only have one parent and zero or more children. If the provided graph does not fit this format an attempt to convert it to such a format will be made.
Kruskal, J. B., Landwehr, J. M. (1983). Icicle Plots: Better Displays for Hierarchical Clustering. American Statistician Vol 37(2), 162-168. https://doi.org/10.2307/2685881
Other layout_tbl_graph_*:
layout_tbl_graph_auto()
,
layout_tbl_graph_backbone()
,
layout_tbl_graph_cactustree()
,
layout_tbl_graph_centrality()
,
layout_tbl_graph_circlepack()
,
layout_tbl_graph_dendrogram()
,
layout_tbl_graph_eigen()
,
layout_tbl_graph_fabric()
,
layout_tbl_graph_focus()
,
layout_tbl_graph_hive()
,
layout_tbl_graph_htree()
,
layout_tbl_graph_igraph()
,
layout_tbl_graph_linear()
,
layout_tbl_graph_manual()
,
layout_tbl_graph_matrix()
,
layout_tbl_graph_metro()
,
layout_tbl_graph_pmds()
,
layout_tbl_graph_sf()
,
layout_tbl_graph_stress()
,
layout_tbl_graph_treemap()
,
layout_tbl_graph_unrooted()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.