[Numpy-discussion] numpy array in networkx graph?
Wed Jun 13 10:04:23 CDT 2012
I have M is numpy matrix with 0's& 1's. I want to color the nodes with
can anyone give me a hint on the following code?
import network as nx
import pylab as plt
G=nx.Graph(M) # M is numpy matrix ,i.e:type(M)=numpy.ndarray
for i in xrange(len(M)):
I didn't get color change, still the defualt color is used.Did I miss
my aim is to obtain:
find total number of w-red-red-z path
number of w-red-red-red-z path
number of w-red-red-red-red-z path
where w (left side of some cyclic polygon(can also be conjugated ring))
and z(right-side of it)are any of the colors except red.
any comment is appreciated?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion