this seems to be a repeated questioned. But I did not get the expected results following previos Q/A. I am exploring things that I did not have time in the past. It is for my own enrichment only. My background in Java is almost non-existing and struggling with Jung too.
These are what I have done (or trying to do):
(1) Define network topology with MIT network GNU Octave toolbox, i.e., vertices and edges.
(2) Define Jung graph vertices and edges in a Java class I put together. Octave invokes the class method.
(3) Vertex layout in Jung with the graph and dimension. KKLayout selected.
(4) Visualization of the layout in Jung.
(5) Output the post-layout vertices (and their xy) and edges back to Octave.
xy of the vertices are located similar to How to use JUNG layout transformations correctly? except that the posting as it is would not compile. Instead, I sent the graph to Abstractlayout and used the transform operated on the graph vertices to generate the xy, as other posts suggested or my understanding of other posts. Abstractlayout is the only layout interface provides the getX and getY methods I found. So I cannot use KKlayout to export xy by design.
However, I am not getting the xy in (5) as shown in (4). The edges appear to be correctly returned. But the xy of the vertices are completely different. See the attached picture.
I further compared the xy within my Java class vs. what is in Octave. They are the same. So, I am getting vertices xy but not the xy used for visualization.
My question is how to extract the vertices xy after Jung layout in 2.0.1? Is there an example that I can follow?