Graphviz layout plugin

Algorithms and parameters to put data in space
chunkyks
Posts:11
Joined:25 Oct 2011 22:16
[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
Graphviz layout plugin

Post by chunkyks » 25 Oct 2011 22:35

Image
TLDR, plugin: http://icculus.org/~chunky/stuff/gephi_ ... aphviz.nbm


I have a bunch of graphs that graphviz does a great job of laying out.

I submitted a blueprint requesting a graphviz plugin, but I went ahead and wrote it myself. Also, all the cool kids bring code to the table :-)

http://icculus.org/~chunky/stuff/gephi_graphviz/

Contained on that page is the source code, the .nbm plugin, and an example graph that dot does a good job of laying out [in this case, it's from a genetic algorithm I'm working on, showing ancestry]

Please feel free to try it and lemme know how it goes. This seemed like a really quick and easy way to bring a whole bunch of neat layout engines to Gephi.

Have fun,
Gary (-;

User avatar
jacomyma
Gephi Core Developer
Posts:61
Joined:09 Feb 2010 23:23
Contact:

Re: Graphviz layout plugin

Post by jacomyma » 26 Oct 2011 15:38

Cool ! I appreciate that you did it by yourself and contribute to the Gephi project :D !

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Graphviz layout plugin

Post by admin » 27 Oct 2011 07:23

Nice job! But I can't validate your plug-in as it's not out of the box. I got this exception (Graphviz not installed, windows 7):

java.io.IOException: CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
Caused: java.io.IOException: Cannot run program "dot": CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
[catch] at org.icculus.chunky.gephigraphviz.GraphvizLayout.goAlgo(GraphvizLayout.java:105)
at org.gephi.layout.LayoutControllerImpl$LayoutRun.run(LayoutControllerImpl.java:178)
at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Can you find a solution to embed the application?

chunkyks
Posts:11
Joined:25 Oct 2011 22:16
[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: Graphviz layout plugin

Post by chunkyks » 27 Oct 2011 08:15

I tried looking, but couldn't find a really good way to embed binaries in the jar that would work for all platforms, always.

Currently I just recommend that people install graphviz separately. That has the added benefit that folks can update their own install of graphviz faster than I can push updates. It sounds like a bit of a cop-out, but I have many negative experiences of developers "helpfully" bundling a specific version of something with their software, and then causing problems down the line.

Perhaps I'll look at embedding a binary just for Windows; I'm not sure what it needs, but I imagine windows users will be the ones least likely to have an easy path to getting dot installed. What do you think?

Gary (-;

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Graphviz layout plugin

Post by admin » 29 Oct 2011 20:29

Is there any way for the plugin to check if Graphviz in installed, and warn the user if it's not the case?

chunkyks
Posts:11
Joined:25 Oct 2011 22:16
[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: Graphviz layout plugin

Post by chunkyks » 29 Oct 2011 22:10

Yeah, that's a good idea, and was already on my list of stuff to finish.

I mailed the plugins mailing list, but no answer yet; whats the correct way to report an error to the user?

Should I just do a JOptionPane, or is there a better process provided by netbeans or gephi?

Gary

chunkyks
Posts:11
Joined:25 Oct 2011 22:16
[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: Graphviz layout plugin

Post by chunkyks » 31 Oct 2011 00:19

OK, I put in a helpful error message if the process can't be launched . Plugin is in the same place as before

Gary

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Graphviz layout plugin

Post by admin » 31 Oct 2011 04:43

All right, it's now published!

chunkyks
Posts:11
Joined:25 Oct 2011 22:16
[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: Graphviz layout plugin

Post by chunkyks » 31 Oct 2011 17:45

Awesome, thank-you!

Gary

finestjava
Posts:1
Joined:02 Jan 2012 00:21
[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: Graphviz layout plugin

Post by finestjava » 02 Jan 2012 00:55

Hi

Couple of questions:

I have been using Graphviz to visualize Twitter Stream files
and it has been doing a great job for simple coloring.

Today I came across Gephi and really like how easy and smooth it works.
Ran through the Les Miserables tutorial without a hitch beside mine being flipped
horizontally to the tutorial. No big deal.

Now the questions:
1. What is the best layout for a gv file that has 17444 nodes and 18068 edges
2. What is gephi way of doing Graphivs ccomps - command line ccomps -zX# -1000
3. Why will the Graphviz Plugin not find my installed Graphviz

Thanks

Harry Osoff

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