gephi/gephi — Issue #491: ForceAtlas2 layout generates different result on toolkit
Author: kaabr
Created: 2011-12-09 15:40:10+00:00
State: open

Hi,

I am trying to use the toolkit with the ForceAtlas2 layout and the results are pretty different from the platform. I tried it both ways with different exporters, page sizes, parameters and multiple "goAlgo" executions. As far as I can see, YifanHu behaves ok.

The code is akin to the "simple headless example", with the modifications below:

ForceAtlas2 fa2Layout = new ForceAtlas2(new ForceAtlas2Builder());
fa2Layout.setGraphModel(graphModel);
fa2Layout.resetPropertiesValues();
fa2Layout.setEdgeWeightInfluence(1.0);
fa2Layout.setGravity(1.0);
fa2Layout.setScalingRatio(2.0);
fa2Layout.setBarnesHutTheta(1.2);
fa2Layout.setJitterTolerance(0.1);

for (int i = 0; i < 100 && fa2Layout.canAlgo(); i++)
fa2Layout.goAlgo();

PDFExporter pdfExporter = new PDFExporter();
pdfExporter.setPageSize(PageSize.A4);
pdfExporter.setLandscape(Boolean.FALSE);

TIA,

Célio.