views:

581

answers:

2

Hi everyone,

I'm trying to generate some graphs with prefuse, and it seems like the easiest way to load the data into prefuse is to use a GraphML file.

Is there an easy way to write these files from my data?

Or is there an easier way to load my data into prefuse?

Thanks

+2  A: 

yEd can export graphs in GraphML format and JGraphT has a GraphMLExporter. Leaves the problem on how to get your data into those products or libraries. But at least both can create the desired format.

on the other hand - GraphML is in XML format so you can easily use jdom or dom4j to create a DOM, add the nodes based on your data an serialize it to an XML file. This shouldn't be to complicated.

Andreas_D
Could you please have a look at one more prefuse question at http://stackoverflow.com/questions/2273068/how-to-display-3-nodes-with-3-diff-shapes-in-prefuse-library-for-java
Yatendra Goel
+2  A: 

You could use the Network Workbench, which allows you to load data in a lot of different forms including edge lists. Edge lists are usually the easiest format to generate.

I'm not completely sure if you can export from NWB to say GraphML, but NWB includes a number of visualizations, some of which are based on Prefuse.

If you want to do more with your data than just visualize it then NWB might help you.

Binary Nerd
Could you please have a look at one more prefuse question at http://stackoverflow.com/questions/2273068/how-to-display-3-nodes-with-3-diff-shapes-in-prefuse-library-for-java
Yatendra Goel