Slashdot Mirror


Graphing Libraries for Java?

Node and Edge asks: "Many interesting problem domains involve some form of graph-based or graph-like information: network activity visualizations; social software; workflow management; P2P software development; and version control with branching, just to name a few. It is notoriously difficult for people to visualize a graph structure - unless it happens to be a strictly hierarchical tree-like structure, such as what we know from file-system explorers. Now, with all of that said, what graph libraries can you recommend? The following criteria apply, though they're not absolute: Java or Java bindings; simple to use for simple applications; and polished, extensible UI components. I'm familiar with JGraph, JUNG, Prefuse, OpenJGraph, Tigris GEF, Eclipse GEF, Graphviz, but have not had a chance to evaluate them all. Have you used any of these extensively? If so, can you provide any constructive advice? If not, can you recommend something else, ?"

7 of 51 comments (clear)

  1. CEWolf by subri · · Score: 2, Interesting
  2. Finally a Slashdot Article about this! by rowanxmas · · Score: 5, Interesting
    It just so happens that I have done a lot of work in this area. Specifically in the business of making a good Open Source Java Graph library. For me there were several concerns.
    1. Open Source, Free
    2. Really Cool Looking Display
    3. Easy to add to
    4. Easy to use API
    5. Suited to my work ( Biology )
    At the time we were using yFiles, but it has several problems. Mainly, it is pay-for-it software, and hard to extend (i.e. no Interfaces, Node and Edge are final, not Open Source, so no custom code was possible.) However, yFiles has better layout than anyone else in this field.

    After evaluating many packages (which are listed here) which include the ones you have listed. We decided that our needs were not met and built our own. (First one on the preceding link) The main thing that I needed was a flexable UI, for showing Multi-Dimensional Data, and support for subgraphs, in a way that makes lots of sense in how I work, but I am not sure if it is suitable elsewhere yet, or not.

    The integrated software that uses my Graph Library is called Cytoscape and while still a work in progress is getting way better every release. In terms of the Graphing support, I think we are top notch, but we need to spend more time on algorithms and layouts ;) In addition we have an active development team that is well funded from MSKCC, UCSD, ISB, Agilent, and support from Unilever.

    I will be checking this thread throughout the weekend, so please reply if I can be of more help. And thanks for getting this onto Slashdot! I hope that more people will becocem involved in graphing, and especially in making file formats standard ;)
    1. Re:Finally a Slashdot Article about this! by Anonymous Coward · · Score: 2, Interesting

      Great, thanks for the response. The screenshots for Cytoscape look very polished; the plug-ins seem to cover a broad spectrum of applications, which is very cool. I actually submitted this "story" near the end of January, so was surprised to see it show up today!

      I'm looking into GINY now and would be interested to hear more about the sub-graphing system that is mentioned on the main GINY page (I will read the detailed documentation, but maybe you can give an overview)?

      Looks like it's possible to create some pretty nice custom nodes - is it easy to create nodes with image icons?

      For my application, the graph UI has the following characteristics:
      1. Typically shows between five and fifty nodes per graph.
      2. Various nodes may have different icons.
      3. It should be possible to open a dialog window when a node is clicked, or right-clicked.
      4. It should be possible to control the color of a node through code (generally a thin border around the image), to indicate the change in state of a given node.
      5. It should be possible to create and modify connections (edges) between nodes.
      6. It should be possible to arrange the layout manually, but also to apply an automated layout routine.

      I am currently doing all of these things with an existing library, but the library in question is no longer being supported as free-of-charge software, so I am looking elsewhere ...

      My goal is to achieve all of the above items with code that is as simple and clear as possible. I'd also like some sort of "zoom" window, i.e. a high-level overview of the graph, for when the nubmer of nodes gets large - looks like GINY has something like that. I also need the ability to collapse parts of the graph into a single "combined" node, and re-expand the node again; is this something you currently do in Cytoscape or one of the other apps?

      How does one typically link GINY to an applications data model? Does GINY use its own graph structure (in duplicate), or do I just write an adapter to my model?

      I'll read up on your library, any suggestions or thoughts are welcome!

  3. On graphviz by Woodblock · · Score: 2, Interesting

    I've used graphviz extensively in one project. I found it simple to use and I believe there are Java bindings available, but it is pretty simple to just create a dot file and feed that to dot(1). But it does not provide widgets or anything you can integrate into a Java application in that way. It simply deals with visualization and layout of graph structures. If all you need is an image, it is great, but anything beyond that and it won't serve your needs.

  4. What are you trying to *do*? by crmartin · · Score: 3, Interesting

    I've used JGraph and Graphviz very happily, and can recommend them ... but they do very different things. Can you feed us a couple of use cases, or user stories? A little narrative?

  5. JFreeChart works for us by blake182 · · Score: 3, Interesting

    We use JFreeChart which works fine for us. We have fairly simple data to graph (a line chart with messages per second, bar charts for top spam and virus recipients) for the analysis summary in an email scanning product.

  6. Any for Python? by rendermaniac · · Score: 2, Interesting

    Just wondering if anyone knows some good libraries for doing this with Python? Or would it be better to use a Java one with Jython? And how would you go about this?

    Simon