Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plot directed bipartite graph

I would like to have a plot of a directed bipartite graph. I can easily get the bipartite graph to look nice or the directed graph. But, I would like a bipartite picture with the directed edges. Here is what I've tried.

G=Graph()
left=['S1','S2','S3']
rt=['T1','T2','T3','T4']
for v in left+rt:
    G.add_vertex(v)
for l in left:
    for r in rt:
        G.add_edge(l,r)
BipartiteGraph(G).to_directed().plot()
click to hide/show revision 2
retagged

plot directed bipartite graph

I would like to have a plot of a directed bipartite graph. I can easily get the bipartite graph to look nice or the directed graph. But, I would like a bipartite picture with the directed edges. Here is what I've tried.

G=Graph()
left=['S1','S2','S3']
rt=['T1','T2','T3','T4']
for v in left+rt:
    G.add_vertex(v)
for l in left:
    for r in rt:
        G.add_edge(l,r)
BipartiteGraph(G).to_directed().plot()