Graph Control in Java/Netbeans? Does it exist? - java

Is it possible that anyone has a link to a graph class/library that I can use to produce a graph in Java?
Thanks for any help!

My top choice would be JGraph as others have suggested; I am using JGraph5 because it is better documented than the newer alternative, JGraphX. EDIT: JGraphX turns out to be the far superior version, despite the lack of documentation. It's not that hard to figure out.
JGraph
Demonstration app
Feature list
Licensing agreement
Other alternatives I've researched:
JGraphT
"JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms...complete source code included, under the terms of the GNU Lesser General Public License." (http://jgrapht.sourceforge.net/)
Main project repository
Example visualizations
JUNG - Java Universal Network/Graph Framework
Main project repository
yEd Graph Editor
Implementation of yFiles library
Demonstration Java applet
About yEd
Saves graphs in GraphML format

I used JGraph as a visualizer for networks of nodes/topologies at my previous job, it's not half bad once you get past the architecture (it's a big state machine if I recall correctly).

Visual graph: JFreeChart
You may also wish to consider the Google Charts API, if you can make web service requests.

A really good alternative is to used the Google Charts API. Platform independent, easy to use, and fast processing (done on Google Server side)

graphviz would be my choice. It's not Java, but still terrific and easy to use.
There is a Java component that works with dot to generate graphs. I've used it - very nice, indeed.

I would recommend JGraphT. I used it to create multi-leveled graphs in my dissertation and as the base of a GPS Routing Software, understanding what is going on I found a bit of a mind bender, but once looking at how the algorithms package works I found it quite easy to implement A*/D* heuristic algorithms. For working out the distance between nodes on the graph I'd also recommend looking at the Haversine function, if that's your thing.

Related

Simple Java GIS Editor

I'm looking for a library/application that would give me a good starting point for an application that will needed to:
display a (big) rail/street network on a map (geographically limited to central Europe)
rail/street network has its custom graph data structure (no standards we could benefit from)
standard interaction with map: zoom/pan
interaction with network: remove/add nodes and edges. move nodes.
Implementation preferably in Java. Thats's it ;)
Would love to hear your suggestions on this topic!
Thanks very much,
Patrick
There is GeoServer which is a full-featured geospatial server based on the GeoTools library.
Besides, you could check all the other projects hosted by OSGeo.
As for standards, there are quite a few that you could benefit from, developed by OGC.
Give uDig a shoot. Open source and in Java.
Fulfils your criteria of display and interaction (I tried with relatively large vector data, not sure about raster performance though).
I cannot really say how it works with network datasets, but with enough programming skills you could probably hack your way with some custom plugins. Here is a starting point.
Another interesting project worth checking out is Degree which is in OsGeo endorsed projects just like Geoserver.

Need a java library for visualization that support automatic layout

I need a java graph library for visualization that I can incorporate in my own application. I found that jgraph is excellent for visualization but require explicit positioning of the nodes. Is there any open source java graph library that support automatic layout. Any suggestion will be really helpful for me.
There are numerous packages to do that.
If you are used to graphviz, then you may like Grappa, which is a sort of graphviz library for java (though not as complete as the original).
jung is also quite good, providing various layout engines.
Another tool of interest to build nice graph visualizations and animations is prefuse. It it very flexible, and can lead to very good looking visualizations, with complex layouts.
All of them are java libraries, and open source.
I've used JGo for years with success - not free (has free eval).
http://www.nwoods.com/go/jgo.htm
It has autolayout options for digraphs and force-directed, for sure, maybe more. I think the newer versions are much spiffier.
JGraph does support automatic layout and includes a number of graph and hieracichal layout algorithms.
See the API reference and example code for details.

Embedding dendrogram in Java

I'm looking for a library capable of drawing dendrograms of data in Java (not calculating them, I can do it by myself).. do you have any clues? Already tried to search it over Google but haven't found anything that is not stand-alone (while I need to embed the generation inside my program).
Thanks!
Check out the JUNG graph library. It won't perform the actual clustering for you but is a really good library for visualising your results.
Take a look at Archaeopteryx. It has fairly many features; it's open source, and it is available in a pre-packaged jar file.
BTW, I use JUNG and really like it. It can perform various clusterings, but AFAIK, it has no inherent dendrogram capabilities. Because it has graphing capabilities, you could roll your own dendrogram, but it would take some work.

Graph Visualization in a Eclipse RCP aplication

I am working on an Eclipse RCP application which should display an internal hierarchical structure as a graph. The nodes of the graph should be positioned on different points of a background image but should offer drag support. The graph should be zoom-able possibly without resizing the nodes on the maps (layout zoom) while the background image should be scaled normally. Some kind of semantic zoom (showing and hiding sub nodes on request) should be possible.
Which library or tool would be suitable to solve this problem?
Update:
The graph should be displayed similar to an UML class diagram.
I guess the term graph is confusing. Your description suggests a travelling salesman or or class diagram style graph, instead of a earning for the last quarter style graph. I think you are looking for something along the lines of GUESS or Zest.
JFreeChart does most (maybe even all, it is a very comprehensive tool) of what you list, It is simply embeddable in Eclipse. See the Eclipse-CS plugin for example usage.
Best bet would be Graphical Editing Framework (GEF) http://www.eclipse.org/gef/. As it highly integrates into eclipse and includes a 2d visualization library.
As for third-party libraries:
Either prefuse or processing.org are java-based which can be used for graph-based visualization. You should wrap either org.prefuse for prefuse or wrap processing.core for processing as a standalone osgi plugin for a better version-maintenance.
I'd recommend you look at http://code.google.com/p/uofs-silver-hg/ as it is a system that integrated prefuse in her workspace.
I also recommend you look at gephi graph toolkit http://gephi.org/toolkit/ as your problem may involve large-scale information processing.
JUNG is the best Graph vis package I've seen to date.
jung.sourceforge.net
Super flexible and you can pretty much cusomize everything.
Cheers.
You could use Structure101. It will give you the hierarchical graphs which you can export and then manually overlay on your graphic. In fact, you can grab package-level graphs from a s101 repository using an url so I guess you could maybe construct what you're looking for in html...
Cheers.
As far as I know: EMF (Eclipse Modeling Framework) and GMF (Graphical Modelign Framework) are best well-known frameworks to do that.

Java Library with subgraph isomorphism problem support?

I'm trying to analyze the usage of "#include" in C files (what is included first, dependencies...).
To do so, I extract from a C file the "#include" and I'm building a graph. I would like to identify common patterns in this graph...
So far, I'm using JGraphT as the graph engine (not sure this is the correct expression) and JGraph for the rendering (however using jgraph is a bit problematic since the Layouts are no longer included in the free release).
I've been unable to find any isomorphism support in jgrapht. Do you know any solution providing this kind of support (something like igraph but for java)..?
I'm using java 1.5 and the proposed solution must be free...
Not sure one of them can do isomorphism but I've collected a couple of links to graph layout engines in my blog: http://blog.pdark.de/2009/02/11/graph-layout-in-java/
You might want to look at graphviz, too. It's not Java but has a very powerful layout engine.
As for isomorphism: You probably only need to check for patterns at level 0 (i.e. the direct includes) because anything below that must be isomorphic by definition (all files included by some include file will always be the same unless someone used a lot of #if magic in the includes section).
Have you looked at Parsemis?
It's a Java graph mining library, and (sub)graph isomorphism is fundamental to this process, so my guess is that they're solving this issue somehow.
Not sure about the license though, but I believe it's open source as it was developed for academic reasons.
I've been pondering this problem myself lately (looking for common markup structures to factor out of JSPs into tags, in my case).
A library for this would be great. I haven't found one yet. In the meantime, here are a couple of problems that may be related to yours (isomorphically?).
I was planning to research the technique mathematical software uses to analytically evaluate integrals in calculus problems. In this case, there are a bunch of known structural patterns, and the problem in question has to be matched to one of the known patterns. The best way to do this is not always obvious because it depends on what terms are grouped together, etc.
Algorithms used in biology to find corresponding structures in two complex molecules might also be adapted to this problem.
Looks like there was a mention of isomorphism in the "experimental" package of JGraphT a few months back, but apparently no documentation.
Isomorphism comparison is a fundamental requirement in cheminformatics software (technically it's monomorphism that's used). Atoms are "nodes" and bonds are "edges". Molecular graphs are undirected and can be cyclic. A few open source cheminformatics libraries written in Java are available. You might be able to find some clues for solving your problem by looking at these libraries.
For example, I've written a BSD-licensed cheminformatics library called MX that implements a monomorphism algorithm based on VF. I wrote a high-level overview of how the algorithm was implemented, and you can browse the source for the mapping package in my GitHub repository. Most of the work is done in the DefaultState class.
MX also includes a fast exhaustive ring detector and other graph manipulations that might be applicable to your problem.
I sure don't know of a particular graph library with subgraph isomorphism code — since it's known NP-complete, you can't do a lot other than search anyway. It shows up a lot in graph rewriting schemes, so AGG might help.

Categories

Resources