igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Plot - simple question


From: Romildo Martins
Subject: Re: [igraph] Plot - simple question
Date: Tue, 21 Apr 2009 10:56:51 -0300

Dear Gábor,

The problem is the label edge...


#my graph - exists two edges (0,1)
mynet<- graph(c(0,1,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,0,1,8,0,8,7,8,2,9,8,9,9,3,6,9,6,4), directed=FALSE )

# only edge is curve
E(mynet)$curved <- FALSE
E(mynet)$curved[1] <- TRUE

# label edges and vertices
V(mynet)$name <- seq_len(vcount(mynet))-1
E(mynet)$name <- seq_len(ecount(mynet))

#plot
plot(mynet, layout=layout.fruchterman.reingold,vertex.label=V(mynet)$name, edge.label=E(mynet)$name)

Thanks a lot!

2009/4/21 Gábor Csárdi <address@hidden>
Use curved edges, see e.g. an example here:
http://lists.gnu.org/archive/html/igraph-help/2009-04/msg00104.html

Best,
Gabor

On Mon, Apr 20, 2009 at 11:51 PM, Romildo Martins
<address@hidden> wrote:
> Hello,
>
> I would draw two edges joining two vertices ...
>
> g<-graph(c(0,1,1,0),directed="false")
> E(g)$name<-c("simple","question")
> plot(g,vertex.shape="circle", layout=layout.circle,edge.label=E(g)$name)
>
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



--
Gabor Csardi <address@hidden>     UNIL DGM

Attachment: mynet.PNG
Description: PNG image


reply via email to

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