[转]Java Graphing Library Round Up

来源:互联网 发布:沈阳飞客数据恢复 编辑:程序博客网 时间:2024/05/16 13:06
This week I'll present a few of the Java graphing libraries I've found on the net. But first, what is a graphing library? I won't explain what a graph is as that should be obvious to most (nodes, edges, the basis for fsm's, trees, flowcharts, etc...). A graph library gives the developer tools to created and display graph structures in a gui environment.

In looking at graph libraries I have a few other criteria; it would be nice if the library provided methods for loading graphs from an external file format as well. Another useful feature is the ability to do graph layout; ie organize the nodes and edges so there is minimal overlap of edges and the nodes have a hierarchical structure. This is also known as 'graph visualization'. It turns out that graph visualization and layout is a hot area of academic research, meaning its a very non-trivial endeavor.

The following libraries have varying strengths and weaknesses I'll note as we go.

JGraph seems to be the most mature and complete Java graphing library around. It comes with lots of code examples including a useful graph editing widget that could be used as solid basis for a graph editing component in your application. One drawback is that JGraph has a hybrid opensource/commercial licensing structure. This means that the base JGraph library is free, but the more useful libraries, like JGraph Layout Pro and JGraph Pad Pro (a very rich graph and even more complete editing component than is included with JGraph) requires the purchase of a not cheap license.

JUNG - Java Universal Network/Graph Framework By my cursory inspection, jung is a close second to JGraph as far as functionality. Jung is quiet a lot more low level than JGraph, you'll be rolling your own editor as the example editing applet seems a bit limited in functionality. Two major pluses for jung are 1) it includes many different layout/visualization algorithms and 2) it's optmized for really large graphs.

LGL - large graph layout library. This is an academic project that consists of a set of tools for working with REALLY BIG graphs, like those found with "large biological networks". Apparently it uses an opengl based component to view the graph in either 2d or 3d. I haven't tried this library, it seems alot more low level than I want to deal with.

VGJ - Visualizing Graphs with Java is an all in one component that unifies graph editing, loading graphs from external files, and provides visualization algorithms. The only drawback to this project is it has the look of an old AWT application. And now that I've gone back to look at the page, the only link appears to be to the applet. So it doesn't appear to under active development either.

Finally, if your interested in doing rich client development for the Eclipse platform there's the Eclipse Modelling Framework. There may be a comparable project for netbeans, but since I use neither, I don't know.

{0}发表于 n29 2006年10月21日, 11:11:56 上午 MDT Permalink 留言 [8]
留言:

Your forgot at least JGo from NWoods (commercial) and of course the great and free prefuse!

{0}发表于 AlArenal on 2006年10月21日, 01:28 下午 MDT
站点: http://www.alexander-langer.de #

What about jfreechart (http://www.jfree.org/jfreechart/)?

{0}发表于 Paul Woodward (84.9.35.77) on 2006年10月22日, 05:11 上午 MDT #

Yeah, I know about prefuse, but I'm not aiming to be exhuastive here. So I left it out. And I'm only interested in free stuff (or mostly free).

JFreechart is a aimed at making line, bar, and pie charts. This link explains what the 'graphs' I'm talking about are: http://en.wikipedia.org/wiki/Graph_theory

Thanks for the input guys.

{0}发表于 n29 (64.218.109.47) on 2006年10月22日, 07:57 上午 MDT #

There is also GRAPPA, still another graph library (actually a wrapper over GraphViz - that is also open source -)
I have used with excellent result to plot coplex graphs:

http://www.research.att.com/~john/Grappa/

{0}发表于 Franco Graziosi (81.208.106.65) on 2006年10月23日, 12:38 上午 MDT
站点: http://www.fga-software.com #

Yes, Netbeans does also provide a graphing library, http://graph.netbeans.org/. I believe it can also be used as a standalone library. I'm planning on using it next year, but thank you for providing some useful alternatives.


Rob

{0}发表于 Rob Stone on 2006年10月23日, 05:47 上午 MDT #

We've looked extensively at these and many more, and settled on two, for two different reasons. We started out with YFiles, a fabulous commercial product (before that it was Tom Sawyer), then switched to JGraph, which is *extremely* difficult and painful to use. The API ks just horrible. We've since switched JUNG, and it's been great. Note that our needs are pretty extreme: multiple edges between two nodes, self-loops, layouts, etc.

On a related note, we also use Piccolo for a graph editor (screenshot here: http://kdl.cs.umass.edu/software/Web_Composite.png) The needs were different (less on layout, more on interactivity and zooming). It's a great library as well. More here: http://www.cs.umd.edu/hcil/jazz/index.shtml

Cheers!

{0}发表于 Matthew Cornell on 2006年10月23日, 09:47 上午 MDT
站点: http://ideamatt.blogspot.com #

Great links guys! Thanks!

{0}发表于 n29 (66.140.92.11) on 2006年10月23日, 09:57 下午 MDT #

Netbeans Visual Library! I've used JUNG and looked at prefuse. Both come at the MVC from a very non-intuitive(to Java Swing programmers) point of view and I found them very cumbersome. The Netbeans Visual Library offers a far friendlier programming model, a great looking UI, Netbeans support, and it's open source.

Surprised at the major omission.

{0}发表于 Alex (124.168.124.97) on 2006年10月24日, 06:52 上午 MDT #

 自:http://www.jroller.com/page/languages?entry=java_graphing_library_round_up
原创粉丝点击