On 15.11.2014 21:54, charlie wrote: > Hi, > > I've just installed graph_tool on my Mac via Homebrew, more-or-less > according to the walkthrough recommended on the graph-tool installation page > (https://gist.github.com/openp2pdesign/8864593). > > When I try to use the graph_draw function I get an error. > > Please help! Thanks. > > > > Here is my command and the error traceback: > > graph_draw(g, vertex_text=node_map.keys(), inline=True)
Is node_map a dict? It looks like you are passing an arbitrary list of
values as vertex_text, but it only accepts a single string or a
PropertyMap. Please take a closer look at the documentation and the
examples therein. If you want to have different texts in each node you
should do something like:
text = g.new_vertex_property("string")
text[g.vertex(0)] = "foo"
text[g.vertex(1)] = "bar"
...
graph_draw(g, vertex_text=text)
Best,
Tiago
--
Tiago de Paula Peixoto <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] http://lists.skewed.de/mailman/listinfo/graph-tool
