[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [igraph] Question about plotting in igraph a weighted graph

**From**: |
Moses Boudourides |

**Subject**: |
Re: [igraph] Question about plotting in igraph a weighted graph |

**Date**: |
Sun, 24 Apr 2011 17:46:48 +0200 |

Of course! For some stupid reason (i duno y), I was writing
"edge.label=E(g)$id" instead of the correct "edge.label=E(g)$weight".
Thanks, Gabor.
--Moses
On Sun, Apr 24, 2011 at 5:42 PM, Gábor Csárdi <address@hidden> wrote:
>* Hello,*
>
>* you can set an edge attribute called 'label', or just give it as a*
>* parameter to plot():*
>
>* plot(g, edge.label=E(g)$weight)*
>
>* See ?igraph.plotting for details.*
>
>* Unfortunately it is not currently possible to change the position.*
>* More precisely you have to put on the labels yourself, using the*
>* text() function, after calculating the label positions from the vertex*
>* positions.*
>
>* Gabor*
>
>* On Sun, Apr 24, 2011 at 11:38 AM, Moses Boudourides*
>* <address@hidden> wrote:*
>*> Hello,*
>*>*
>*> I'm sorry to bother you by asking something very elementary (almost*
>*> trivial), if not already answered many times. I have a graph object*
>*> which is a weighted graph and i want to plot it in igraph in such a*
>*> way that the weight of each edge is written as a number next to the*
>*> edge. How is this done? And how could I control the position that the*
>*> number (of weight) is placed?*
>*>*
>*> Best,*
>*>*
>*> --Moses*
>*>*
>*> _______________________________________________*
>*> igraph-help mailing list*
>*> address@hidden*
>*> https://lists.nongnu.org/mailman/listinfo/igraph-help*
>*>*
>
>
>
>* --*
>* Gabor Csardi <address@hidden> MTA KFKI RMKI*
>
>* _______________________________________________*
>* igraph-help mailing list*
>* address@hidden*
>* https://lists.nongnu.org/mailman/listinfo/igraph-help*
>