[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] display graph with known edge lengths
From: |
Gabor Csardi |
Subject: |
Re: [igraph] display graph with known edge lengths |
Date: |
Mon, 26 May 2008 09:56:14 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Luda,
this is a non-trivial problem, since nothing ensures that a graph with given
"edge lengths" can be realized in 2D at all.
I think the "solution" is to either 1) apply a force-based layout
algorithm to your graph, such that takes into account the length (weights) of
the edges, or 2) do multi-dimensional scaling (MDS).
For 1) see this example:
http://lists.gnu.org/archive/html/igraph-help/2007-06/msg00023.html
For 2), if you use R, then see ?isoMDS in the MASS package.
My personal experience is that 1) creates layouts that looks better,
although i haven't checked how accurate the layouts are, i.e. whether
the distance of the vertices is really proportinal to the given edge
weights....
Best,
Gabor
ps. please consider joining the mailing list, otherwise 1) you might miss
some answers and 2) your messages will be delayed until i acknowledge them.
Thank
On Sun, May 25, 2008 at 06:47:59PM -0500, Liudmila S. Yafremava wrote:
> Hi!
>
> I need to find a way to display a graph with known edge legths between nodes.
> I found all kinds of graphing software
> which can display and manipulate graphs and networks, doing complicated
> things, but I have not been
> able to find a simple solution to this problem. I have a list of nodes, and
> edge lengths between them. All I need is to be able to display them in a
> graceful way. Anyone knows how to do this?
>
> Thanks,
> Luda
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> UNIL DGM