[graph-tool] How can I give a vertex a text?

Tiago de Paula Peixoto tiago at skewed.de
Mon Mar 10 10:41:14 CET 2014

On 03/09/2014 07:36 PM, Hang Mang wrote:
> Hi,
> how can I specify for each vertex a text so that when i draw the graph
> its text gets drawn instead of its index?

Please take a look in the full documentation of the graph_draw()
function, specially the "text" attribute:


Essentially, something as simple as graph_draw(g, vertex_text=foo) will
do what you want, where foo is a vertex property map containing the text
you want.


Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20140310/a3bef8cb/attachment.asc>

More information about the graph-tool mailing list