Reputation: 51
Using colab I'm trying to print a graph "Input -> program -> results" from left to right, but it print top to bottom. My code:
from graphviz import *
gv = Digraph('G', filename='process.gv')
gv.rankdir='LR'
gv.edge('input', 'program')
gv.edge('program', 'results')
gv.node('program', shape='box3d')
gv
I also tried (instead of 3rd line):
gv.graph('graph', {})['rankdir'] = 'LR'
or
gv.rankdir('LR')
But it returned error messages
Would very much appreciate anyone's help.
Upvotes: 4
Views: 241