Hi all,
I am wondering if some of you have some references (and hopefully a gephi implementations) of a layout algorithm able to deal with nodes of different and fixed size. The idea is to have something able to perform a kind of Fruchterman Reingold/Spring layout without any edge overlapping nodes.
When googling this question, I have found papers/ideas discussing how to avoid node overlapping, but it did not seemed to include edge overlapping nodes.
Regards,
Martin
[SOLVED] Layout with variable node size
- martin.pernollet
- Posts:18
- Joined:05 Oct 2010 12:42 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
- mbastian
- Gephi Architect
- Posts:728
- Joined:10 Dec 2009 10:11
- Location:San Francisco, CA [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Layout with variable node size
Yes the Force Atlas algorithm can take node size in account, check out 'Adjust By size' parameter.
Check out also http://gephi.org/plugins/noverlap/ plugin, which does a great job on that!
For edge overlapping, it is a much more complex issue, though discussed quite a lot by scientists. Recently, NodeXL introduced a edge crossing readability metric, it's worth a look!
Check out also http://gephi.org/plugins/noverlap/ plugin, which does a great job on that!
For edge overlapping, it is a much more complex issue, though discussed quite a lot by scientists. Recently, NodeXL introduced a edge crossing readability metric, it's worth a look!
- martin.pernollet
- Posts:18
- Joined:05 Oct 2010 12:42 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Layout with variable node size
Thanks! I'll read details on that! The first Google result about force atlas discuss the linlog algorithm that seems to have stronger mathematical foundations.
Re: Layout with variable node size
Oh yes, LinLog is better, more efficient, and more robust in a theoretical perspective than the forceAtlas (I'm its author).
Actually, forceAtlas is just our "homebrew" layout, and we adapted it to our needs. Because forceAtlas is "our thing" we implemented a way to avoid nodes overlap (we needed it). But of course it's possible to implement this feature in other layouts.
Actually, forceAtlas is just our "homebrew" layout, and we adapted it to our needs. Because forceAtlas is "our thing" we implemented a way to avoid nodes overlap (we needed it). But of course it's possible to implement this feature in other layouts.
- martin.pernollet
- Posts:18
- Joined:05 Oct 2010 12:42 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Layout with variable node size
OK, thanks for all your explanations!
Martin
Martin
- martin.pernollet
- Posts:18
- Joined:05 Oct 2010 12:42 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Layout with variable node size
Hi again,
Since I was far away on holidays, I started to adapt -on a paper- the Fruchterman algorithm to consider node border instead of node center. When I've been back, I was eager to try it, and actually it worked quite well.
Then I tried Force Atlas and I found it is superior to any other layout provided in Gephi, considering its ability to avoid crossing edges (is it really a feature or was I lucky?), so I really want to throw my Fruchterman mutant through the window and I would like to see how Force Atlas deals with sized nodes.
I have seen in the source code that it works with NodeData, and that NodeData provides size. How can I set up this size in the Gephi application? Is there any GraphML metadata that is recognized by Gephi?
Regards,
Martin
Since I was far away on holidays, I started to adapt -on a paper- the Fruchterman algorithm to consider node border instead of node center. When I've been back, I was eager to try it, and actually it worked quite well.
Then I tried Force Atlas and I found it is superior to any other layout provided in Gephi, considering its ability to avoid crossing edges (is it really a feature or was I lucky?), so I really want to throw my Fruchterman mutant through the window and I would like to see how Force Atlas deals with sized nodes.
I have seen in the source code that it works with NodeData, and that NodeData provides size. How can I set up this size in the Gephi application? Is there any GraphML metadata that is recognized by Gephi?
Regards,
Martin
- martin.pernollet
- Posts:18
- Joined:05 Oct 2010 12:42 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Layout with variable node size
Hi again,
I finally solved the point using the Gephi toolkit, which worked in the minute. For those interested, first build your model this way:
And then retrieve the result graph view as follow:
Your toolkit is both very powerfull and very easy to use guys, congratulation for your work!
Regards,
Martin
I finally solved the point using the Gephi toolkit, which worked in the minute. For those interested, first build your model this way:
Code: Select all
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel();
Node n = gm.factory().newNode("name");
n.getNodeData().setSize(size);
Code: Select all
PreviewController controller = Lookup.getDefault().lookup(PreviewController.class);
GraphSheet graphSheet = controller.getGraphSheet();
Graph viewGraph = graphSheet.getGraph();
for(org.gephi.preview.api.Node n: viewGraph.getNodes()){
Point p = n.getPosition();
float radius = n.getRadius();
}
Regards,
Martin