This layout function was specifically designed to display Orphanet classifications.
Indeed, it only contains from/to relationships, so the latter must be oriented from top to bottom (or bottom to top if reverse_y
is TRUE
).
The function was designed to be used with plot.igraph()
(layout
argument).
The associated vertical positions are obtained using vertical_positions
.
Examples
graph = get_ancestors('303', output='graph')
plot(graph)
plot(graph, layout=igraph::layout_as_tree)
plot(graph, layout=layout_tree)
df_y = vertical_positions(graph)