On Thu, Apr 2, 2009 at 12:25 PM, Tamas Nepusz
<address@hidden> wrote:
I guess rJava works the other way round; i.e., it allows you to access Java objects from R.
Another idea, I'm not sure I need full integration. Could an output layout be written that includes the x,y,z coords for each node/edge, so that it could be imported into a java app and plotted?
Do you mean that you want to generate a layout with igraph, save the coordinates and then use that to plot something in Processing? That should be simple; assuming that g is your graph in Python, you can simply do as follows:
from igraph import *
# Construct your graph here
layout = g.layout("kamada_kawai_3d")
f = file("layout.txt", "w")
for x, y, z in layout:
print >>f, x, y, z
f.close()
You can also construct a Python script that simply writes the coordinates to stdout and then call it from Java and read the output of the Python script directly.
--
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help