group layout of independent networks

Feb 6, 2012 at 10:21 PM

I just recognized that for some algorithm are not able to do the group layout if all the networks are independent. Here a screenshot how it should look like: and here what happens for some layout algorithms .

Working layouts are:

  • SpiralLayout
  • SinusoidLayout
  • RandomLayout
  • GridLayout
  • FruchtermanReingoldLayout

Not working layouts:

  • SugiyamaLayout
  • PolarLayout
  • HarelKorenFastMultiscaleLayout
  • FruchtermanReingoldLayout (with ImproveLayoutOfGroups=true;)



Feb 7, 2012 at 4:40 PM
Edited Feb 7, 2012 at 4:41 PM

* PolarLayout: Did you add the ReservedMetadataKeys.PolarLayoutCoordinates key to each vertex?  If you don't do that, all the vertices will end up at the polar origin.

* SugiyamaLayout, HarelKorenFastMultiscaleLayout and FruchtermanReingoldLayout (with ImproveLayoutOfGroups=true): These work in our own application, and I'm not aware of any bugs that would prevent them from working in others.  What makes you think they don't work?

-- Tony

Feb 7, 2012 at 5:32 PM

This is what happens with Sugi, HarelKoren, and FruchtermanReingold (with  ImproveLayoutOfGroups=true ). It  only happens when the neteworks int eh groups are totally independent. If the networks have connection between the groups then it works as expected.

Feb 8, 2012 at 6:01 PM

It's hard to see what's going on with that tiny image, but my guess is that the graph isn't actually getting laid out and all the vertices are stuck at their default locations, at the graph's origin.  Are you certain you're waiting for the LayOutGraphCompleted event before saving the image?  You might want to add some Debug.WriteLine() statements at the point in your code where you're saving the image to see if the Vertex.Location properties are anything except (0,0).

-- Tony