wting / python-graph

Automatically exported from code.google.com/p/python-graph
Other
5 stars 4 forks source link

attributes not allowed in edges #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It is not possible to use attributes in edges
(http://www.graphviz.org/doc/info/attrs.html).

GvGen solves this with

graph.propertyAppend(postman, "color", "red")

I whink that for python-graph it would be nice to have:

add_edge(self, u, v, wt=1, attributes=None)

where attributes could be a list of tuples like [("color", "red"),
("penwidth", 4), ...]

Original issue reported on code.google.com by matteo.z...@gmail.com on 25 Aug 2008 at 2:29

GoogleCodeExporter commented 9 years ago
I'm sorry, but python-graph is not meant to be a graph drawing tool, but an 
graph
algorithm library. Basic drawing support is provided, but that's all. What you 
are
asking for goes against the purpose of this library. I usually like to add the
features people request, but I'm afraid I'll have to let this one pass.

If you need more sophisticated and refined drawings, you are surely much better
served by GvGen or by any other tools specialized in this task. At worst, if you
really need both algorithms and customizable drawings, you could easily 
translate
python-graph graphs to GvGen. If you do so, I'll be happy to add your code to 
the
wiki so other people can benefit from it too. Also, I would not mind helping 
you with
this (just drop me a mail or join our development group/mailing-list).

Original comment by pmatiello on 26 Aug 2008 at 12:12

GoogleCodeExporter commented 9 years ago
Other user convinced me on this one. I'm reopening the issue.

Original comment by pmatiello on 5 Sep 2008 at 8:01

GoogleCodeExporter commented 9 years ago
Added to svn repository.

Original comment by pmatiello on 9 Sep 2008 at 4:43