Sorry for disturbing again, but I’m trying to draw a graph (with graphviz) with labels on vertices and on edges.
I saw in the documentation that vprops and eprops are Python attributes with values that are dictionaries containing
key-value pairs, where key is a graphviz attribute and value is either a string or a property map.
So I tried the following:
graphviz_draw(g, vcolor=typev, vprops={label: labelv}, eprops={label: labele}, output=fname+".pdf »)
where label is a graphviz property (as explained in http://www.graphviz.org/doc/info/attrs.html#d:label)
and labelv and labele are property maps defined as
labelv = g.new_vertex_property("string")
labele = g.new_edge_property("string »)
This doesn’t work and I get the error message
Traceback (most recent call last):
File "build-graph.py", line 459, in <module>
graphviz_draw(g, vcolor=typev, vprops={label: labelv}, eprops={label: labele}, output=fname+".pdf")
NameError: name 'label' is not defined
But label is indeed a graphviz property, no doubt upon that. What am I doing wrong?
Thanks in advance
Yannis
attachment.html (3.85 KB)