For a given graph g I cannot change the attribute of a single vertex (in this case, 'color' ):
from igraph import Graph # create triangle graph g = Graph.Full(3) cl_blue = (0,0,.5) cl_red = (.5,0,0) g.vs['color'] = 3*[cl_blue] g.vs['color'][0] = cl_red
after that print g.vs['color'] still gives
[(0, 0, 0.5), (0, 0, 0.5), (0, 0, 0.5)]
How to assign values ββto individual elements?
python list igraph
flonk
source share