|
From: | Ahmed Abdeen Hamed |
Subject: | Re: [igraph] Labeling vertices |
Date: | Thu, 8 Jan 2015 21:09:37 -0500 |
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.
viz-graph-ddi.py
Description: Text Data
network-sample-problematic.csv
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |