I am using python module for pydot to make flowcharts. But the flowcharts are being generated in a vertical fashion. I want them to be generated in a horizontal way. Is there any way that this can be achieved?
Asked
Active
Viewed 514 times
1 Answers
1
You need to give your graph the rankdir=LR
attribute, as shown in this Graphviz forum post.
I don't know pydot (but I have written a few programs that create graphs in the DOT language), so I don't know the exact syntax you need to use, and I'm having trouble locating docs for pydot, but it appears that you can just pass the attribute as a keyword in the Dot constructor, eg
dot_object = pydot.Dot(graph_name="main_graph", rankdir="LR", ...)

PM 2Ring
- 54,345
- 6
- 82
- 182