How to draw a directed graph with arrows showing vertically from bottom to top

119 Views Asked by At

If I have a directed graph, how can I draw it with arrows showing in general vertically from bottom to top, like showing a class inheritance pattern in OOP(object oriented programming)?

1

There are 1 best solutions below

2
On

If the graph is acyclic, you can use topological sorting to assign a vertical level to every vertex.