1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

graph edge length

Posted by jay on Feb 08, 2008

The graph library is brilliant! Unfortunately though I'm having a little bit of trouble deciphering the descriptions on the webpage. Is there a way to manipulate the length of individual edges? I would like to increase the length between key nodes in the hopes that it will make my graph more legible.

Thanks in advance for any suggestions.

jay



Posted by Tom De Smedt on Feb 13, 2008

Admittedly, setting the length of individual edges is not possible right now, but it shouldn't be too difficult to implement, I'll have a look at it. Sounds like a useful feature to have.

Meanwhile, you can use the distance parameter when you create a graph object or the graph.layout.tweak() method to influence the layout algorithm.



Posted by Tom De Smedt on Feb 25, 2008

Hi Jay, you can download the latest version. The graph.add_edge() command has a new optional edge parameter, and edge objects all have a length property which is 1.0 by default. If you increase or decrease this value, this individual edge will become longer or shorter.