GraphStream Users

Archives de la liste Aide

help needed with layout

Chronologique Discussions 
  • From: <sbarr10 AT>
  • To: graphstream-users AT
  • Subject: help needed with layout
  • Date: Sun, 7 Jul 2013 16:21:10 +0200 (CEST)

Hello everyone,

I am very new to GraphStream and this is my first message. Thank you for
developing this amazing toolkit !

I am using GS to try modeling relationships between people who test their
autosomal DNA.

The link shows what I have achieved so far.

The individual nodes represent the testers in this DNA project. The edge
between 2 nodes is a measure of shared DNA material. Nodes with no
connections mean that the tester has not had a match in the project yet. An
edge that is a thicker gray line between 2 nodes means the two testers are
known to be very close relatives (e.g., uncle-niece, mother-child, etc).

The data is static (there is no change over a few minutes.) I am expecting
number of testers to increase very slowly over time (months, years) as more
testers join the project. There is no need for interaction with the graph and
there is no need for the graph to dynamically change in the display. The data
itself will change, very slowly over months and years, as more testers join

But as you can see I am having a problem with layout. The nodes are bunched
too closely together. Some node labels or edge values are obscured. Because
the project will grow, I cannot dictate XY coordinates for each node. I have
tried using some of the attributes listed here but I cannot get them to work
maybe I am using them incorrectly?

My code is very minimal and listed here:


Graph graph = new MultiGraph("Driscoll");
FileSourceFactory fsf = new FileSourceFactory();
FileSource fs = null;
try {
fs = fsf.sourceFor("driscoll.txt");
} catch( IOException e) {
} finally {
for (Node node : graph) {
node.addAttribute("ui.label", node.getId());
for (Edge edge: graph.getEachEdge()) {

Viewer viewer = graph.display();

My input file consists of only an and ae commands, e.g.,
an kN73108
ae line01 k190013 k84509 arcvalue=27

I understand SpringBox is the default Layout. How can I get the nodes to
each other more, spread out further apart, and get more control over the
lengths of the edges?

I would love to be able to one day present this data to the O'Driscoll DNA
project and possibly to the genealogy RootsTech conference held in Salt Lake

Thank you so very much! Merci.


P.S. I am sorry I studied French so long ago (1981) and remember so little of
it now!

Archives gérées par MHonArc 2.6.16.

Top of page