55

Is there an Open Source java alternative to GraphViz? I'm aware of the existence of Grappa which basically wraps the Graph interface to GraphViz as an JavaAPI. However the layouting is still done by the GraphViz binaries.

I'm looking for a pure-java, open source library providing the same functions and layouting algorithms as GraphViz.

Dominique Fortin
  • 2,212
  • 15
  • 20
paweloque
  • 18,466
  • 26
  • 80
  • 136
  • 1
    'However, current versions of the software are now licensed on an open source basis only under The Eclipse Public License (EPL). ' - http://www.graphviz.org/Download.php – Stephen Nov 23 '12 at 09:40
  • 1
    Looking at the source papers is well worth it http://www.graphviz.org/Theory.php – Stephen Nov 23 '12 at 09:44
  • 2
    https://github.com/jamisonjiang/graph-support, This is probably the closest project to what you describe. – jiangyongbing24 Apr 09 '23 at 04:14

6 Answers6

18

Interestingly, the Eclipse project has an SWT/JFace component/framework capable of displaying and generating (import/export) Graphviz's 'DOT' format, in pure Java:

ZEST (home page & download links)

See http://wiki.eclipse.org/Graphviz_DOT_as_a_DSL_for_Zest for usage examples.

Although ZEST is touted as an Eclipse plugin, it does seem that the DOT-manipulation API's can be used standalone and external to an Eclipse installation.

To clarify, the DOT functionality is a part of the ZEST 2 functionality, which itself is a sub-component of the GEF4 project.

Cheers

Rich

Update (May 2017) https://github.com/nidi3/graphviz-java

Big Rich
  • 5,864
  • 1
  • 40
  • 64
  • 3
    From the FAQ on Zest which is part of GEF for eclipse: Can I develop a standalone GEF application without use of the Eclipse platform? The official answer is No, this is not supported. – davenpcj Jul 05 '13 at 21:01
  • Just to clarify, I was not suggesting that you don't need the Eclipse framework/API, just that you can code your own, standalone, DOT-based application, independently of the ZEST Eclipse plugin. – Big Rich Jul 08 '13 at 23:10
  • As far as I was able to use this plugin I can tell that it does not support subgraphs nor colors or any other specialities about DOT. – Basic Coder Feb 19 '15 at 17:07
  • The problem I have with nidi3/graphviz-java is that it's a hack built upon another hack (it bundles a V8 JS engine to run viz.js, which is Graphviz compiled to JS with emscripten). The dependency is just as large and slow as you might expect from that. – Clashsoft Dec 23 '19 at 10:19
18

You can have a look at JUNG (Java Universal Network/Graph Framework) which has visualization and analytics functions. It's open source.

DrDee
  • 3,549
  • 6
  • 30
  • 37
  • 2
    been using JUNG now for a while, having tried Gephi and some others, it seems to work really well, though I've already reached the point where I'm going to have to create my own layout algorithm to get what I want. – davenpcj Aug 13 '13 at 18:05
8

You could look at JGraph though I have never used it so cannot comment on now it compares to GraphViz.

Frodo Baggins
  • 8,290
  • 6
  • 45
  • 55
Mark
  • 28,783
  • 8
  • 63
  • 92
6

yFiles seems to provide all this, but it's not free and not really cheap either. But then again it seems to be a very professional product (haven't used it, except in yEd, which can be used for free).

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
4

I guess ZGRViewer is what you want. I really like ZGRViewer and AJaPaD.

Mike Chen
  • 250
  • 2
  • 4
  • That is a really nice viewer. It required almost no effort to get it working on my Windows 7. Hopefully, I will be able to hack its source code to integrate it with my Java application. – Ahmed Nassar Oct 28 '14 at 00:50
2

I worked with yFiles about four years ago, and it was excellent. It's costly (though less than JGraph, apparently) but I work in a CS research lab and had access to their generous academic pricing.

Matthew Cornell
  • 4,114
  • 3
  • 27
  • 40