1

I need to draw my graph that has a root node and childs have crossrelations between them as standard graphviz draw algorithm. Root on the top, childs below. Treelayout and RadialTreeLayout do not suit (not strong tree and show buggy view for my tree when it's tree). Is there a way to draw a graph as graphviz without Forest and TreeLayout, RadialTreeLayout? I can't find standard layout for SparseMultigraph that does that.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

The basic idea is that you extract a tree from your original graph, lay out that tree using TreeLayout, and then use the positions from that layout as the input to a StaticLayout for the original graph.

There's sample code that does that here: https://github.com/jrtom/jung/blob/master/jung-samples/src/main/java/edu/uci/ics/jung/samples/MinimumSpanningTreeDemo.java

Joshua O'Madadhain
  • 2,704
  • 1
  • 14
  • 18
  • Thanks a lot! jung2 too complex for me:) Found a great replacement, especially after small improvements) https://github.com/rsimon/scala-force-layout Good luck! – Georgii Dernovyi Aug 11 '16 at 08:36