GraphStream Users

Archives de la liste Aide

A few questions about the graph layout algorithm

Chronologique Discussions 
  • From: youri flement <youri.flement AT>
  • To: graphstream-users AT
  • Subject: A few questions about the graph layout algorithm
  • Date: Sat, 7 Mar 2015 21:03:47 +0100


I'm sorry this is in English, my French is not that good...

I'm trying to integrate the GraphStream SpringBox layout algorithm in an application I'm developing for school and I have a few questions:

  • Is the image attached a valid rendering of a connected graph with 3 edges using this layout algorithm? (I had to alter the coordinates a bit because I only received x- and y-values between 0 and 1)
  • Is it normal for the layout algorithm to sent a very high amount of events, even for small graphs? (for example, the rendering above gave me 771 nodeAttributeChanged events)
  • Which is the most performant algorithm: LinLog or SpringBox?

Kind regards,

PS. This is somewhat how I'm using the layout algorithm:

         public MyClass() {
        SpringBox layout = new SpringBox();

        layout.nodeAdded("0", 1000, "a");
        layout.nodeAdded("0", 2000, "b");
        layout.edgeAdded("0", 3000, "aToB", "a", "b", true);

        LayoutRunner runner = new LayoutRunner(layout, layout);

    public void nodeAttributeChanged(...) {
         // adjust position of the changed node

Attachment: SmallGraph.png
Description: PNG image

Archives gérées par MHonArc 2.6.16.

Top of page