Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comparing open source java graph drawing frameworks(JUNG and Prefuse) for drawing network topology

which of the open source Java graph drawing frameworks to use for a network diagram with the following requirements? The graph will have less than 1000 nodes.

1) has parallel edges
2) directed and undirected edges within a single graph
3) nodes represented by images
4) user interaction with nodes and edges
5) dynamically adding/deleting nodes and edges
6) multiple labelling on nodes and edges , different levels of labelling can be turned off/on by users. (like drawing in layers and turning off / on a layer)
7) different layout algorithms to display star, ring, mesh topologies

I evaluated JUNG and Prefuse. This is what I found for each of my requirements.

1) Prefuse cannot display parallel edges while JUNG supports it. Can prefuse code be manipulated to display parallel edges ? Since this involves basic data level changes I believe this would be more difficult that the usual customized rendering changes.

2) I didnt find any reference to combined graph (both directed and undirected edges) in both prefuse and JUNG. Does anyone know otherwise?

3) This seems easy with both Prefuse and JUNG

4) Again both prefuse and JUNG provides support for user interaction.

5) Both prefuse and JUNG supports it. How does each framework perform while redrawing the graph ? I saw in another post that prefuse does not perform well for dynamic updates (Prefuse Toolkit: dynamically adding nodes and edges)

6) This comes down to modifying the graph and redrawing it. So the question becomes the same as 5)

7) Both JUNG and prefuse has multiple layout algorithms. But When I tried to display the same dataset using FruchtermanReingoldLayout in both JUNG and Prefuse I get different displays. Any ideas why ? Somehow the layout algorithms in Prefuse seem to display a better layout than in JUNG (rendering is also better I think) though most of the layout algorithms in Prefuse are based on JUNG implementation. Prefuse layouts such as ForceDirectedLayout/FruchtermanReingoldLayout and CircleLayout directly maps to star,circle, mesh topologies.

Outside of these requirements, prefuse has good support for expressions and query language but looks like it is not actively developed unlike JUNG. which one has better visualization? Any suggestions on which one will be suitable and how to overcome the shortcomings ?

Any other frameworks out there which I can use ?

like image 769
user572964 Avatar asked Jan 12 '11 15:01

user572964


1 Answers

I'm one of the creators and maintainers of JUNG, so bear that in mind for the responses below.

First, though, I should say that the author of Prefuse is a friend of a friend (and yes, we've met) and he's done a great job. I am not experienced with Prefuse, but I've seen some beautiful visualizations created with it.

Here are the answers to those questions for JUNG. Several of them ((1), (2), (4)are demonstrated in PluggableRendererDemo:

  1. Supported (you'll need the right data model, not all support parallel edges for performance reasons)
  2. Supported (again, you need the right data model)
  3. Supported (see ImageShaperDemo)
  4. Supported (most demos)
  5. Supported (see GraphEditorDemo)
  6. Not directly supported, although you can certainly change labels dynamically and use HTML to render complex labels.
  7. JUNG's layout algorithms are more for general networks (with a few exceptions for trees, etc.). You can certainly construct your own layout algorithms, however, and many have done so.

Hope this helps.

like image 166
Joshua O'Madadhain Avatar answered Sep 24 '22 06:09

Joshua O'Madadhain