Is there a way to label the edges of graphs created with pattern.graph?

18 views
Skip to first unread message

Phil Gooch

unread,
May 15, 2015, 4:15:46 PM5/15/15
to pattern-f...@googlegroups.com
Hi there

The examples for http://www.clips.ua.ac.be/pages/pattern-graph show labelled nodes but not labelled edges. The cats and dogs example has g.add_edge(n1, n2, weight=0.0, type='is-related-to') but the 'is-related-to' does not display in the HTML graph. Is there a way to create labelled edges?

Many thanks

Phil

Tom De Smedt

unread,
May 27, 2015, 6:37:43 PM5/27/15
to pattern-f...@googlegroups.com
There is code in an old version of the graph code that does this:
https://www.nodebox.net/code/data/media/graph.zip

Look for a draw_edge_label() function (I think it's called), it should not be hard to adapt and revive the code in that function to graph.js. 

You could also add a new issue to the Github repository of Pattern explaining that this functionality is missing, and then I'll take care of it eventually.

Best,
Tom
--

---
You received this message because you are subscribed to the Google Groups "Pattern" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pattern-for-pyt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages