[BioC] Rgraphviz - how to use node positions from one graph as node positions in another?
Li.Long at isb-sib.ch
Li.Long at isb-sib.ch
Wed Jul 25 12:03:03 CEST 2007
Hi,
Here're a few points for you to consider:
(1) "neato" draws a graph by constructing a virtual physical model, a
"string" model, running an iterative solver to find a low-energy
configuration; therefore the final positions of the nodes are determined
by the initial positions only, user has very little control on this; you
can influence (a) the initial positions by setting a random seed, (b)
termination threshold, (c) edge lengths and weights; that's about all you
can do;
(2) from (1), it's not so easy to draw subsequent subgraphs using dynamic
layout while retaining node positions;
(3) if you output the "original" graph in plain text format, such as DOT,
GXL, and the like, you can extract the node/edge drawing info from there,
and render any subgraphs the very same positions as the original;
(4) if you just want to plot the graphs in R interactively and use
"agopen", you can get the node position by looking into AgNode(g)'s slot
"center", which gives the x-, y-coordinates in R;
(5) one way you could consider to highlight a subgraph is to give them a
distinct set of attributes, such as color, shapes, so that when you apply
certain set of attributes, certain subgraph stands out; along the same
line, you could choose colors that obscure the unwanted, say, white for
node color, font color, etc.;
(6) if "subsequent graphs" have little to do with the original, then it
would be a lot harder to do anything, I think;
It depends a lot on what "subsequent graphs" you have and how you want to
view them.
Li
> Dear list,
>
> I create a "graphNEL" graph with a neato layout. I would like to get the
> locations of nodes in that graph and use these locations when creating
> subsequent graphs (such that all the graphs have the nodes in the same
> locations). How can this be achieved?? Apologies if this issue has come op
> on the list, but I haven't found it...
>
> Thanks in advance
> Søren
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
More information about the Bioconductor
mailing list