Question

So I have around 2.5mill nodes coming in from different sources, mostly phylogenetic trees and other data from databases. I am trying to visualize a network map using the sigmajs implementation and got around to writing up the xml with scripting. What I cannot get my head around is how are the x and y positions calculated? The les_miserable visualisation clearly shows that it is ordered and the gexf documentation doesn't tell much about how we are supposed to calculate x and y coordinates. Tinkering around with the positions using three nodes didn't shed much light on this issue, and the gephi website seems to be down from my end. It would be really helpful, if someone can explain how x and y coordinates are calculated in such complex network maps involving 4 or 5 clusters.

Was it helpful?

Solution

The x and y (and z, if you want 3D!) coordinates are calculated with a "layout", ForceAtlas being one of these layouts. You either apply the layout in Gephi desktop version, or programmatically through a Java program utilizing the Gephi Toolkit Java library, available here: https://gephi.org/toolkit/

An example of running a layout: https://wiki.gephi.org/index.php/Toolkit_-_Layout_graph

Then you can export your network in a format that preserves nodes coordinates - the gexf format is a good one. Script to export a graph to gexf format using the toolkit: https://wiki.gephi.org/index.php/Toolkit_-_Export_graph

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top