Constant layout orientation in igraph
I am drwaning graphs in igraph using the "layout_with_dh" layout, but everytime i generate the graph the orientation is changed. Is there a way to keep the same orientation of the graph as i would be looking at the graph for different timepoints so I want them to look the same.
• 6,411 views
•
link
1 answer
The best approach for dynamic graphs is to fix the node positions after running one of the layout algorithms on one instance of the graph. You can get the coordinates from the corresponding igraph layout function, e.g.:
coords <- layout.davidson.harel(g)
plot(g, layout = coords)
This means you can also manually tweak the coordinates to your liking.
• 0 views
•
link
Log in to answer this question.
Try setting the random number generator seed with
set.seed(). For example: