Hi, 

Thanks for the reply.  You are right, I was trying to pass in a list.  I had 
another look at the docs after I made the post and tried to delete it when I 
realised what I’d done, but I guess it had already gone out to the mailing 
list.  Sorry about that.  

Cheers,

Charlie


> On 16 Nov 2014, at 00:18, Tiago de Paula Peixoto <[email protected]> wrote:
> 
> 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] <mailto:[email protected]>>
> 
> _______________________________________________
> graph-tool mailing list
> [email protected] <mailto:[email protected]>
> http://lists.skewed.de/mailman/listinfo/graph-tool 
> <http://lists.skewed.de/mailman/listinfo/graph-tool>
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to