Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

draw bipartite graph networkx

X, Y = bipartite.sets(B)
pos = dict()
pos.update( (n, (1, i)) for i, n in enumerate(X) ) # put nodes from X at x=1
pos.update( (n, (2, i)) for i, n in enumerate(Y) ) # put nodes from Y at x=2
nx.draw(B, pos=pos)
plt.show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #draw #bipartite #graph #networkx
ADD COMMENT
Topic
Name
5+4 =