igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Labeling vertices


From: Ahmed Abdeen Hamed
Subject: Re: [igraph] Labeling vertices
Date: Thu, 8 Jan 2015 21:09:37 -0500

Yes, of course!

Attached is a tiny dataset that reproduces the problem, and the script that I am using to generate the network. And, you are right indeed. Somehow, the vertices are visualized as a list not as individuals as shown down here:
Inline image 1 

Thanks very much,

-Ahmed




On Thu, Jan 8, 2015 at 6:53 PM, Tamas Nepusz <address@hidden> wrote:
Judging from your earlier screenshot, it seems like the labels are *lists* of
hashtags and not individual hashtags (as the function assumes). Can you post
a small, reproducible, self-contained example that demonstrates the problem?

T.

On 01/08, Ahmed Abdeen Hamed wrote:
> Yes, thank you!
>
> The function is really simple, it works correctly in other context except
> this one. Here is the implementation:
>
> def is_hashtag(vertex):
>     return vertex["name"].startswith("#")
>
> -Ahmed
>
>
>
> On Thu, Jan 8, 2015 at 4:59 PM, Tamas Nepusz <address@hidden> wrote:
>
> > Have you confirmed that your is_hashtag() function is working correctly?
> > For
> > one thing, it seems to me that each vertex contains multiple hash tags, so
> > it
> > could be the case that is_hashtag() is simply returning False for all the
> > vertices.
> >
> > T.
> >
> > On 01/08, Ahmed Abdeen Hamed wrote:
> > > It is still shows the hashtags even though they shouldn't. Here is small
> > > screenshot that shows that there are hashtag appearing. What am I doing
> > > wrong?
> > >
> > > -Ahmed
> > >
> > >
> > > [image: Inline image 1]
> > >
> > > On Thu, Jan 8, 2015 at 4:15 PM, Tamas Nepusz <address@hidden> wrote:
> > >
> > > > > visual_style["vertex_label"] = ["" if is_hashtag(vertex) else
> > > > > vertex["name"] for vertex in g.vs]
> > > > >
> > > > > However, there is a glitch. Suggestions?
> > > > Your code seems okay; what is the problem with it? How did you try to
> > plot
> > > > the
> > > > graph and what glitch did you see?
> > > >
> > > > --
> > > > T.
> > > >
> >
> >
> >
> > --
> > T.
> >

--
T.

Attachment: viz-graph-ddi.py
Description: Text Data

Attachment: network-sample-problematic.csv
Description: Text Data


reply via email to

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