how to use vertex_text, etc when using


I am brand new to graph-tool and found out with example how to label
vertices when using graph_draw, as seen below

graph_draw(g, vertex_text=labelv, edge_font_size=40, edge_text_distance=20,
edge_marker_size=40, output="output.png")

but do not see how to label vertices and edges when doing something like:'testoutput.graphml','graphml')

Can anyone assist with how this is done?


attachment.html (520 Bytes)


You have to define vertex properties like so:

`graph.vertex_properties["labels"] = labels`

assuming `labels` here is a vertex PropertyMap

See here:


attachment.html (1.97 KB)