Hello friends,
I need to make my nodes displayed with different shapes:
I have this function:
def is_pmid(vertex):
return vertex["name"].isdigit()
visual_style["vertex_shape"] = ["square" if is_hashtag(vertex) else "cirlce" for vertex in g.vs]
Only the if statement gets executed but not the else. A very similar code snippet works if i used colors not shapes:
visual_style["color"] = ["blue" if is_pmid(vertex) else "skyblue" for vertex in g.vs]
Any clue why this might be?
Thanks very much,
-Ahmed