Skip to contents

Rotates a tree layout by -90 degrees to produce a horizontal orientation. This is particularly useful for hierarchical visualizations where a left-to-right structure is preferred over the default top-to-bottom tree layout.

Usage

layout_horizontal_tree(graph)

Arguments

graph

An igraph object representing the input graph.

Value

A numeric matrix with 2 columns representing x and y coordinates of each node in the layout. This matrix can be passed to plot.igraph() or other plotting functions.

Examples

if (FALSE) { # \dontrun{
g <- igraph::make_tree(10)
coords <- layout_horizontal_tree(g)
plot_Net(g, layout = coords)
} # }