Continual Graph Update

Asked by Chris Cannon

Hi,

I would like to have a graph in Gephi that is initially created, then updated programmatically over time. What is the best type of component in Gephi to accomplish this goal? I've been trying to do it with a Layout Plugin, but perhaps a Generator Plugin would be best?

Thanks,
Chris Cannon

Question information

Language:
English Edit question
Status:
Solved
For:
Gephi Edit question
Assignee:
No assignee Edit question
Solved by:
Chris Cannon
Solved:
Last query:
Last reply:
Revision history for this message
Sébastien Heymann (sebastien.heymann) said :
#1

Hi,

A Generator plug-in is suited for creating a graph from nothing. A Hello World is available in the Plugin Center (http://gephi.org/plugins/hello-world/), which you may install directly from your Gephi instance. For doing this, go to Tools > Plugins > Available Plugins and then select the Hello World.

But I think we'll release soon a dynamic graph generator.

Revision history for this message
Chris Cannon (cannon-drexel) said :
#2

Great, thank you!

- Chris

Revision history for this message
Mathieu Bastian (mathieu.bastian) said :
#3

Making a Generator is indeed the best way for the graph creation. And for update, if you're looking for a way you have all the freedom you want with the graph structure I advise you to just add a new menu item in the Plugins menu. Follow these steps:

1) In Gephi source code, add a new Module. Add GraphAPI and UtilitiesAPi dependencies.
2) Right click on your module, select New and Action. Here we create an action MyAction that will do what we want. The Action will be set in the menubar.
3) Select "Always Enabled" action, In the Global Menu option, select "Plugins" and put "MyAction" as a Display Name.
4) Now run Gephi and you see a new menu is accessible from Plugins menubar.
5) Now go to your class and put code in "actionPerformed()" method.

From there, to access current graph just do:

GraphController gc = Lookup.getDefault().lookup(GraphController.class);
Graph currentGraph = gc.getModel().getGraph();

Revision history for this message
Sébastien Heymann (sebastien.heymann) said :
#4

I've just wrote the HowTo code a Generator: http://wiki.gephi.org/index.php/HowTo_write_a_graph_generator

Revision history for this message
Chris Cannon (cannon-drexel) said :
#5

Thank you so much, everything works great!

- Chris