Reputation: 18440
It is very straight-forward to plot a tree using igraph in R
library(igraph)
plot(graph.tree(20, 2), layout=layout.reingold.tilford)
Is it possible to "turn the graph around", so that the root (node 0) is at the top of the plot? Or, alternatively, is it possible to put the root to middle left?
Upvotes: 1
Views: 2183
Reputation: 23985
The easiest way I know of is like this:
plot(graph.tree(20, 2), layout=layout.reingold.tilford, ylim=c(1,-1))
I don't know whether that's officially supported though.
Upvotes: 2