[Top][All Lists]

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

[igraph] Plotting weighted graphs

From: Dan Fleder
Subject: [igraph] Plotting weighted graphs
Date: Tue, 11 Mar 2008 15:43:21 -0700 (PDT)


I'm sorry for such a simple question, but I couldn't seem to resolve it from the help files.

In R/igraph, how does one ensure that plots respect edge weights (distances)? The documentation for layout has one line about weights, but it doesn't give much detail.
For example, imagine a simple graph: a right triangle with sides of length 1, 20, and sqrt(401). The triangle is very long. But, whenever I enter the code below, the plot doesn't show the long edges. (The plot has edges look too equal in length).

D = matrix( c(0,20,401^.5,20,0,1,401^.5,1,0), nrow=3,ncol=3)
g = graph.adjacency(D, weighted=TRUE, mode="undirected")

Thanks in advance for any help

reply via email to

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