This layout mimics the igraph::layout_as_tree() algorithm supplied by igraph, but puts all leaves at 0 and builds it up from there, instead of starting from the root and building it from there. The height of branch points are related to the maximum distance to an edge from the branch node, or read from a node variable.

layout_tbl_graph_dendrogram(
graph,
circular = FALSE,
offset = pi/2,
height = NULL,
length = NULL,
repel = FALSE,
ratio = 1,
direction = "out"
)

## Arguments

graph A tbl_graph object Logical. Should the layout be transformed to a circular representation. Defaults to FALSE. If circular = TRUE, where should it begin. Defaults to pi/2 which is equivalent to 12 o'clock. The node variable holding the height of each node in the dendrogram. If NULL it will be calculated as the maximal distance to a leaf. An edge parameter giving the length of each edge. The node height will be calculated from the maximal length to the root node (ignored if height does not evaluate to NULL) Should leafs repel each other relative to the height of their common ancestor. Will emphasize clusters The strength of repulsion if repel = TRUE. Higher values will give more defined clusters The direction to the leaves. Defaults to 'out'

## Value

A data.frame with the columns x, y, circular, depth and leaf as well as any information stored as node variables on the tbl_graph

## Note

This function is not intended to be used directly but by setting layout = 'dendrogram' in create_layout()

Other layout_tbl_graph_*: layout_tbl_graph_auto(), layout_tbl_graph_backbone(), layout_tbl_graph_centrality(), layout_tbl_graph_circlepack(), layout_tbl_graph_eigen(), layout_tbl_graph_fabric(), layout_tbl_graph_focus(), layout_tbl_graph_hive(), layout_tbl_graph_igraph(), layout_tbl_graph_linear(), layout_tbl_graph_manual(), layout_tbl_graph_matrix(), layout_tbl_graph_partition(), layout_tbl_graph_pmds(), layout_tbl_graph_stress(), layout_tbl_graph_treemap(), layout_tbl_graph_unrooted()