Hey all,
I'm going crazy here after several hours with Gephi and would really appreciate some help.
I'm trying to write Java code that will generate a dynamic graph in code and export it into GEXF using the toolkit. Ultimately this graph will be constructed by reading database tables.
I've looked at the Dynamic Graph and Manual graph examples in the toolkit and tried to hack a minimal example from them. The graph that's created has 50 nodes before I've even added any nodes in code!
I would be very grateful if somebody could provide code to demonstrate:
(1) instantiate a dynamic graph
(2) add/remove a node or edge with dynamic properties
(3) export to GEXF
I'm trying to justify use of Gephi for a client and I feel like I'm 'at the point where these simple stumbling blocks will force me to write it off altogether.
Richie
Writing GEXF for dynamic graphs using Toolkit
-
- Posts:8
- Joined:10 Jan 2012 21:23 [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
- 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: Writing GEXF for dynamic graphs using Toolkit
Hi,
If you initially have 50 nodes you are probably using a sample graph generator.
I attach a sample script showing the ways to work with the graph, attributes, dynamics and exporting.
Without comments and debug prints its pretty straightforward.
I hope it helps,
Eduardo
If you initially have 50 nodes you are probably using a sample graph generator.
I attach a sample script showing the ways to work with the graph, attributes, dynamics and exporting.
Without comments and debug prints its pretty straightforward.
I hope it helps,
Eduardo
- Attachments
-
- Test.zip
- (2.04KiB)Downloaded 725 times
-
- Posts:8
- Joined:10 Jan 2012 21:23 [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: Writing GEXF for dynamic graphs using Toolkit
Argh! Perfect Eduardo. Thanks very much for your help. Gephi folks, put this in the tutorials!
Richie
Richie
Re: Writing GEXF for dynamic graphs using Toolkit
Duly noted, Richie! 

Re: Writing GEXF for dynamic graphs using Toolkit
Hello Eduardo,
I'm just a java newbie, having taken an intensive java course for a few months.
I opened Netbeans, and pasted this test.java into it.
However, I get the errors:
...
Test.java:30: error: package org.gephi.data.attributes.api does not exist
import org.gephi.data.attributes.api.AttributeType;
I've got red flags on every:
import org.gephi*
Where and How do I get the org.gephi libraries to work?
Is there a link to show the baby steps for java dummies?
Thanks a lot!
I'm just a java newbie, having taken an intensive java course for a few months.
I opened Netbeans, and pasted this test.java into it.
However, I get the errors:
...
Test.java:30: error: package org.gephi.data.attributes.api does not exist
import org.gephi.data.attributes.api.AttributeType;
I've got red flags on every:
import org.gephi*
Where and How do I get the org.gephi libraries to work?
Is there a link to show the baby steps for java dummies?
Thanks a lot!
- 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: Writing GEXF for dynamic graphs using Toolkit
Hi,
You need to add the gephi toolkit jar as a library in your Netbeans project.
Check this http://stackoverflow.com/questions/5893 ... n-netbeans
Eduardo
You need to add the gephi toolkit jar as a library in your Netbeans project.
Check this http://stackoverflow.com/questions/5893 ... n-netbeans
Eduardo
-
- Posts:6
- Joined:07 Oct 2013 10:09 [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: Writing GEXF for dynamic graphs using Toolkit
hello,
thanks for the file test.zip. but i have a question what is the difference between creating a dynamic graph like this
Graph graph = gexf.getGraph();
graph.
setDefaultEdgeType(EdgeType.UNDIRECTED)
.setMode(Mode.DYNAMIC)
.setTimeType(TimeFormat.XSDDATETIME);
and the DynamicGraph.
And just more explication for the difference between dynamic and static graphs.
thanks for advance for responses
thanks for the file test.zip. but i have a question what is the difference between creating a dynamic graph like this
Graph graph = gexf.getGraph();
graph.
setDefaultEdgeType(EdgeType.UNDIRECTED)
.setMode(Mode.DYNAMIC)
.setTimeType(TimeFormat.XSDDATETIME);
and the DynamicGraph.
And just more explication for the difference between dynamic and static graphs.
thanks for advance for responses
-
- Posts:8
- Joined:22 May 2016 09:37 [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: Writing GEXF for dynamic graphs using Toolkit
Hi all....can anybody repost test.zip? i need it for creating dynamic graphs in java plz........Thanks in advance..
- 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: Writing GEXF for dynamic graphs using Toolkit
Hi, attachments were lost but you have toolkit examples here https://github.com/gephi/gephi-toolkit-demos