GraphStream Users

Archives de la liste Aide

Re: Leveraging the SpringBox algorithm to read out location data for own visualization

Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT>
  • To: graphstream-users AT, Nils Peuser <Nils.Peuser AT>
  • Subject: Re: Leveraging the SpringBox algorithm to read out location data for own visualization
  • Date: Fri, 22 Feb 2019 07:28:05 +0100
  • Ironport-sdr: lNMwMbD/Sh6vSr5eFTqsrVkNixKI1xFdw0dDcuTPhGD5xVSVa/rvK/W4p94LznlDiPdAifBtvo PnUT80sqWv5M7C+FFzC/oz2RJR3NDmj1o=

Hi Nils,

It will compute the layout on the given graph, and coordinates will be available in nodes attributes.


Le ven. 22 févr. 2019 à 05:51, Nils Peuser <Nils.Peuser AT> a écrit :

Dear GraphStream users,

I am currently trying to leverage the GraphStream API for some graph analysis and so far like the library very much. While I have a Java-based program, I would like my visualization to take on a different format, not rendered by Java itself. I was trying to get the SpringBox Layout algorithm to work with a programmaticly created MultiGraph. However, I was not able to do so and read out the currently calculated x/y (no need for a 3d layout) coordinates from the Node attributes. I was trying to dig into the source of SpringBox/ as well was the LayoutRunner/Viewer mechanism but that was a little bit more than I was hoping to have to investigate to simply apply a force-based layout algorithm.

Could someone point me how to do this in a headless environment where I have no access to Java Graphics? Here's example code/pseudo code:


MultiGraph graph = new MultiGraph("derp", false, true);

SpringBox sb = new SpringBox(false);
      for(int i = 0; i < 100; ++i)
      // Read out calculated coordinates
     ???  Node attributes don't work here it seems.

Nils Peuser
DevOps Engineering Manager

7585 SW Mohawk St 
Tualatin, Oregon 

Office: +1 (503) 404-6027 
Twitter | LinkedIn



Get the most valuable transformation, compliance and operational insights from our network of contributors delivered straight to your inbox. Sign up for our Transformation Weekly Newsletter.



Archives gérées par MHonArc 2.6.16.

Top of page