[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Multiple edges plot - R interface
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Multiple edges plot - R interface |
Date: |
Wed, 25 Mar 2009 18:51:06 +0100 |
Hi Jeronimo,
yes, actually you get two edges, but on top of each other. The
not-yet-released 0.5.2 version is able to plot curved edges, so you
can see both edges. You can get an R source package from here:
http://cneurocvs.rmki.kfki.hu/igraph/download/igraph_0.5.2.tar.gz
Here are some examples:
library(igraph)
g <- graph.ring(10, directed=TRUE, mutual=TRUE)
E(g)$color <- sample(1:5, ecount(g), replace=TRUE)
tkplot(g, layout=layout.circle, edge.curved=FALSE:TRUE, edge.arrow.mode=1)
#########
g <- ba.game(50, m=2)
l <- layout.kamada.kawai(g)
plot(g, vertex.label=NA, vertex.size=5, edge.arrow.size=0.2, layout=l)
plot(g, vertex.label=NA, vertex.size=5, edge.arrow.size=0.5, layout=l,
edge.curved=TRUE)
plot(g, vertex.label=NA, vertex.size=rep(c(5,10), vcount(g)),
edge.arrow.size=0.5, layout=l,
edge.curved=TRUE, edge.lty=rep(1:2, ecount(g)))
Best,
G.
On Wed, Mar 25, 2009 at 6:42 PM, Jeronimo Carballo <address@hidden> wrote:
> Hello list,
>
> I am a newbie in igraph and I need to plot a network with multiple edges
> between vertices. It is possible with igraph?
>
> I tried the following code,
>
> g1 <- graph( c( 0,1, 1,2, 2,2, 2,3, 2,3 ), directed = TRUE )
> plot(g1)
>
> and I got only one edge for pair of vertices.
>
> Thanks very much,
>
> Jeronimo Carballo
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM