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.
http://freepages.genealogy.rootsweb.ancestry.com/~colin/DriscollOfCork//Participants/autosomalDNA.png
The individual nodes represent the testers in this DNA project. The edge value
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 the
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 the
project.
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 or
maybe I am using them incorrectly?
http://graphstream-project.org/doc/FAQ/Attributes/Is-there-a-list-of-attributes-with-a-predefined-meaning-for-the-layout-algorithms_1.0/
My code is very minimal and listed here:
System.setProperty("org.graphstream.ui.renderer",
"org.graphstream.ui.j2dviewer.J2DGraphRenderer");
Graph graph = new MultiGraph("Driscoll");
FileSourceFactory fsf = new FileSourceFactory();
FileSource fs = null;
try {
fs = fsf.sourceFor("driscoll.txt");
fs.addSink(graph);
fs.readAll("driscoll.txt");
} catch( IOException e) {
System.err.println(e.getMessage());
} finally {
fs.removeSink(graph);
}
for (Node node : graph) {
node.addAttribute("ui.label", node.getId());
//node.addAttribute("layout.weight",10);
}
for (Edge edge: graph.getEachEdge()) {
edge.addAttribute("ui.label",edge.getAttribute("arcvalue"));
//edge.addAttribute("ui.weight",30);
}
graph.addAttribute("ui.quality");
graph.addAttribute("layout.quality",4);
graph.addAttribute("ui.stylesheet",
"url('file:///c:/dev/graphstream/modeldna/dist/driscoll.css')");
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 repel
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
City.
Thank you so very much! Merci.
Susan
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.