[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] best method of preserving network interactions in a 2D map?

From: Tamás Nepusz
Subject: Re: [igraph] best method of preserving network interactions in a 2D map?
Date: Mon, 15 Aug 2011 21:01:24 +0200

>         Suppose I would like to preserve the input similarities (or 
> distances) as much as possible so that 
> if I computed the Euclidean distances from the resulting network 2D 
> coordinates, I would get an excellent 
> agreement with the original input distances (similar to multidimensional 
> scaling). 
>         Is this possible using the igraph package?  If so, what functions and 
> options should be used. 
Hmm... you mentioned multidimensional scaling above. The good news is that 
igraph 0.6 will actually include multidimensional scaling as a graph layout 
algorithm, so if you are not afraid of compiling the development version from 
source, you can make use of igraph_layout_mds from the C core directly, or the 
corresponding interfaces from R or Python. (Of course the latter would also 
require you to compile the R or Python interface for 0.6 as well).

If you use igraph from R and you do not wish to upgrade to 0.6 yet, you can try 
the cmdscale function in R which can calculate the node positions given the 
distance matrix, and then you can simply give the result matrix in the 
layout=... parameter when you plot the graph. More info about the cmdscale 
function is here:


Hope this helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]