[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] drawing a multishape graph

From: Ahmed Abdeen Hamed
Subject: [igraph] drawing a multishape graph
Date: Tue, 7 Jan 2014 03:07:06 -0500

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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]