Reputation: 2056
In the docs of igraph package there is an example
igraph.options(plot.layout=layout.reingold.tilford)
plot(graph.tree(20, 2))
the output should represent data as a tree. But what I get is
Upvotes: 5
Views: 11325
Reputation: 32351
You apparently need to specify the root:
library(igraph)
g <- graph.tree(20, 2)
plot(g, layout = layout.reingold.tilford(g, root=1))
Upvotes: 13