thomasp85 / ggraph

Grammar of Graph Graphics
https://ggraph.data-imaginist.com
Other
1.08k stars 116 forks source link

Question: Best recommendation for using ggraph to plot a DAG? #66

Closed timwilliate closed 6 years ago

timwilliate commented 7 years ago

I have only been experimenting with this package for a weekend, and already I am finding it a highly compelling alternative to other graph visualization packages for R. Thank you for your work.

In the domain which I work, I frequently report results utilizing plots of networks which are DAG's. The best way that I have found to do this in R (before discovering ggraph I think) is using the DOT layout from graph viz provided within DiagrammeR

What your recommendations for best plotting DAG's using ggraph? I have tried the dendrogram layout, but it appears to force a strict definition of a dendrogram (which it should) and does not let me control the direction of the layout (for example, left to right). Are some of the graph viz layouts available in ggraph?

Thank you for your work. I am looking forward to utilizing this package frequently.

thomasp85 commented 7 years ago

The sugiyama layout is intended for DAGs and while not identical to graphviz' dot layout it should yield similar result. I've got plans to port the d3-force algorithm at some point which should also be useful for trees and DAGs with certain parameters