Toolkit - Export PDF Manual Graph

Please use a mailing-list, see http://gephi.org/developers/
Post Reply [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
jellyBear
Posts:2
Joined:23 May 2016 14: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
Toolkit - Export PDF Manual Graph

Post by jellyBear » 23 May 2016 15:20

Hello everybody, I started with Gephi application for W7 a, and I've crossed to the darkside using Gephi Toolkit.

I've a list of Tweeter Users on a JSON file, I read it with a POJO Java class, and then load it manually into a Gephi Graph using "a FOR loop"

When I try to export to PDF or PNG file I obtain this rubbish https://goo.gl/photos/57J4CXiLAAHbjqwM8

But, If I previosly export it to ".gexf" format, and then load it into a Gephi Graph and try to export the result it's superb.

Could anyone give me one tip ¿?

Thank you in advance.

PD: The data and the POJO object there aren't have error or problems.
HelloGephi.txt
(8.29KiB)Downloaded 573 times

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: Toolkit - Export PDF Manual Graph

Post by eduramiba » 23 May 2016 18:07

I think you need to set x and y positions to the nodes if you create the network programatically. The gexf importer probably does it if nodes don't have positions.

User avatar
totetmatt
Posts:14
Joined:12 May 2016 19:04
Location:München
Contact:

Re: Toolkit - Export PDF Manual Graph

Post by totetmatt » 24 May 2016 08:37

Try just noverlap layout + forceatlas afterward.

Otherwise +1, since 0.9.1, Gephi won't put a random value if x and y arn't given but will use default (0,0) which creates this stack of nodes ;)

jellyBear
Posts:2
Joined:23 May 2016 14: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: Toolkit - Export PDF Manual Graph

Post by jellyBear » 01 Jun 2016 15:17

Thank u so much. I'll try to use layouts or set up (x,y) manually.

littleBobbyTables
Posts:8
Joined:10 Jun 2016 18:19
[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: Toolkit - Export PDF Manual Graph

Post by littleBobbyTables » 10 Jun 2016 18:22

I am having a similar problem, but I can't find the method I need to set the x and y coordinates. Can any of you give a small snippet of code or the method declaration for setting node position? Thank you guys very much! :D

User avatar
totetmatt
Posts:14
Joined:12 May 2016 19:04
Location:München
Contact:

Re: Toolkit - Export PDF Manual Graph

Post by totetmatt » 10 Jun 2016 21:18

From the API

Code: Select all

node = graphModel.factory().newNode(id);
            node.setSize(10);
            node.setX((float) ((0.01 + Math.random()) * 1000) - 500);
            node.setY((float) ((0.01 + Math.random()) * 1000) - 500);

littleBobbyTables
Posts:8
Joined:10 Jun 2016 18:19
[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: Toolkit - Export PDF Manual Graph

Post by littleBobbyTables » 10 Jun 2016 21:22

Thank you very much! It solved my problem perfectly! :D

Post Reply
[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
[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