On 11/12/2013 01:28 AM, vcongz wrote:
> example.py
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4025204/example.py>
> example.xml.gz
> <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4025204/example.xml.gz>
>
> My OS is Ubuntu 12.04 LTS. The graph_tool version is
> python-graph-tool/precise uptodate 2.2.26-1.
> The same error exists when I build animation_sirs.py at the line 31: g =
> Graph(g, prune=True)

This seems to be a bug with the numpy version shipped with Ubuntu
precise. I've tested this here, and everything works fine (i.e. no
errors).

Are you stuck with this Ubuntu version or can you upgrade?

> Besides, I would like to set the pos of vertices by their communities. Such
> as, the vertices in the same community should locate at the near position.
> Can I set pos by myself ?

Of course, pos is a property map like any other. For instance, to change
the position of vertex 42 you do:

    v = g.vertex(42)
    pos[v] = [2.3, 4.2]

Cheers,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to